@cmdoss/agent-pass-plugin 0.1.2-dev.23.1 → 0.1.2-dev.24.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="Stop the agent now",u="Close the pass",w=`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}),f=Object.freeze({leading:3,trailing:3,ellipsis:"\u2026",addressPrefix:"0x"}),T=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}=f,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 S="https://agent-pass-plugin.commandoss.com",g=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"),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=`${S}/#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 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!=="Sign authorization"&&(e.textContent="Sign authorization")}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 O=new MutationObserver(b);O.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 m(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(()=>m(r)).observe(r,{childList:!0,subtree:!0})}m(r)}}}function y(){for(let n of document.querySelectorAll("mysten-dapp-kit-connect-button"))m(n.parentElement)}new MutationObserver(y).observe(document.body,{childList:!0,subtree:!0});y();
1
+ var l="Senro";var d="Stop the agent now",u="Close the pass",w=`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}),f=Object.freeze({leading:3,trailing:3,ellipsis:"\u2026",addressPrefix:"0x"}),T=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}=f,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 S="https://agent-pass-plugin.commandoss.com",g=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"),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=`${S}/#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 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!=="Sign authorization"&&(e.textContent="Sign authorization")}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 O=new MutationObserver(b);O.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 m(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(()=>m(r)).observe(r,{childList:!0,subtree:!0})}m(r)}}}function y(){for(let n of document.querySelectorAll("mysten-dapp-kit-connect-button"))m(n.parentElement)}new MutationObserver(y).observe(document.body,{childList:!0,subtree:!0});y();
package/public/index.html CHANGED
@@ -6,9 +6,9 @@
6
6
  <meta name="color-scheme" content="dark" />
7
7
  <meta
8
8
  name="description"
9
- content="Agent Pass Plugin — a local strategy workspace."
9
+ content="Senro, powered by Agent Pass — a local strategy workspace."
10
10
  />
11
- <title>Agent Pass Plugin</title>
11
+ <title>Senro</title>
12
12
  <link rel="stylesheet" href="/styles/tokens.css" />
13
13
  <link rel="stylesheet" href="/styles.css" />
14
14
  <script type="module" src="/assets/agent-pass-plugin-client.js"></script>
@@ -17,9 +17,7 @@
17
17
  <a class="skip-link" href="#main">Skip to content</a>
18
18
  <div class="app-shell">
19
19
  <header class="app-header">
20
- <a href="/#home" class="wordmark" aria-label="Agent Pass Plugin home"
21
- >Agent Pass Plugin</a
22
- >
20
+ <a href="/#home" class="wordmark" aria-label="Senro home">Senro</a>
23
21
  <nav aria-label="Main navigation">
24
22
  <a href="/#home" data-nav="home"
25
23
  ><span class="nav-label">Home</span
@@ -1,4 +1,4 @@
1
- /* Agent Pass Plugin adopts the live Sui Payments composition: Everett, generous scale,
1
+ /* Senro adopts the live Sui Payments composition: Everett, generous scale,
2
2
  inset charcoal navigation, flat panels and blue directional actions. */
3
3
  * {
4
4
  box-sizing: border-box;
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: agent-pass-plugin-trading
3
- description: Set up Agent Pass Plugin locally, inspect Testnet strategies, request official owner authorization and operate a durable local trading loop through MCP; use Paper only when explicitly selected.
3
+ description: Set up Senro (package @cmdoss/agent-pass-plugin) locally, inspect Testnet strategies, request official owner authorization and operate a durable local trading loop through MCP; use Paper only when explicitly selected.
4
4
  ---
5
5
 
6
- # Agent Pass Plugin local trading
6
+ # Senro local trading
7
7
 
8
- Agent Pass Plugin defaults to **Sui Testnet**, using test SUI and the installed deployment's demo USDC. It is not mainnet or a real-dollar investment product. The delegated key stays in the official SDK's local session/signer on the user's computer. Never request an owner seed/private key, copy an agent key, export signer tokens or move custody to a remote server.
8
+ Senro, powered by Agent Pass, defaults to **Sui Testnet**, using test SUI and the installed deployment's demo USDC. It is not mainnet or a real-dollar investment product. The delegated key stays in the official SDK's local session/signer on the user's computer. Never request an owner seed/private key, copy an agent key, export signer tokens or move custody to a remote server.
9
9
 
10
10
  **Report only observed evidence.** Automated tests, a readable pool, a quote, a pending review or a mock receipt do not establish a completed onchain authorization, trade or revocation. The normal live flow recorded in `docs/testnet-acceptance-2026-11-10.md` is complete and its final plan is revoked; inspect current state rather than assuming another plan is authorized. Report exact evidence and remaining testing limits.
11
11
 
@@ -13,7 +13,7 @@ Agent Pass Plugin defaults to **Sui Testnet**, using test SUI and the installed
13
13
 
14
14
  1. Read the package/project README. Use Node 22.13+. A published npm package is precompiled: never run `npm ci` or a build inside its install/cache directory. In a source checkout only, use `npm ci` when locked dependencies are missing and `npm run build` before setup.
15
15
  2. For the selected client only, run `agent-pass-plugin setup --client codex --register --start` or `agent-pass-plugin setup --client claude --register --start` after npm installation. A source checkout may use `node scripts/setup.mjs` with the same flags after building. The default is Testnet. Use the project path from `/api/setup` outside the checkout. Preserve unrelated MCP entries. Open a new client session if tools are not visible; resume from public `setup.json` rather than repeating setup blindly.
16
- 3. Read `marketplace_status` and inspect **mode**. In Testnet call `onboard` immediately: it must automatically open Agent Pass Plugin's wallet connection screen if no fresh browser connection exists. Do not merely give the user a URL or ask permission to open this already-requested onboarding page. Poll `onboarding_status` after the user connects their wallet, and report onboarding complete **only** when `onboardingComplete` is true. Then read `account_status` and `agent_pass_readiness`. The wallet connection is observational, not trading authorization; SDK readiness/doctor is read-only.
16
+ 3. Read `marketplace_status` and inspect **mode**. In Testnet call `onboard` immediately: it must automatically open Senro's wallet connection screen if no fresh browser connection exists. Do not merely give the user a URL or ask permission to open this already-requested onboarding page. Poll `onboarding_status` after the user connects their wallet, and report onboarding complete **only** when `onboardingComplete` is true. Then read `account_status` and `agent_pass_readiness`. The wallet connection is observational, not trading authorization; SDK readiness/doctor is read-only.
17
17
  4. Keep the local runtime running independently of this conversation. A startup, client registration or wallet connection is never a trade approval or Start instruction. Mainnet is unavailable; never work around that boundary by selecting another deployment.
18
18
 
19
19
  Public setup metadata lives under `AGENT_PASS_PLUGIN_DATA_DIR` (default `.data` in a source checkout; `~/.agent-pass-plugin/data` for npm installs). The durable executable and assets live separately under `~/.agent-pass-plugin/runtimes`, overridable with `AGENT_PASS_PLUGIN_INSTALL_DIR`; do not move signer data into the npm/npx cache. Testnet and Paper use separate `testnet.sqlite` and `paper.sqlite` files. The SDK manages private local session/signing files under `agent-pass` within that directory. Do not place those files in a public document, browser payload or Git commit.
@@ -46,7 +46,7 @@ Keep the agent-led flow short and in this order: **user intent → missing param
46
46
  4. Collect the exact parameters for `create_testnet_plan` in one grouped question (see Conversation): `expectedOwner`, `botId`, `direction`, decimal-string `amountIn`, `budgetIn`, `dailyLimitIn`, owner-chosen `limitPrice`, `intervalSeconds`, whole `durationDays` (1–7), `slippageBps`, `venue`, decimal-string `gasSui`, `gasCapSui`, `gasDailySui`.
47
47
  - Direction is `sui_to_usdc` or `usdc_to_sui`. Amounts/budgets use the **input asset**, with its supported decimals; preserve strings rather than rounding through floating-point display values.
48
48
  - `limitPrice` is **demo USDC per one SUI**: most paid when buying SUI, least accepted when selling SUI. It is mandatory and chosen by the owner. Never invent a permissive price to make a plan start.
49
- - `gasSui` is the initial agent stipend. `gasCapSui` / `gasDailySui` are lifetime/day gas refill allowance caps, separate from that stipend; they are not total execution-cost ceilings. Agent Pass Plugin does not automatically refill gas.
49
+ - `gasSui` is the initial agent stipend. `gasCapSui` / `gasDailySui` are lifetime/day gas refill allowance caps, separate from that stipend; they are not total execution-cost ceilings. Senro does not automatically refill gas.
50
50
  - Per-order amount, daily cap, lifetime cap, current funds and agent gas are different quantities. A spending cap is not a portfolio-loss limit.
51
51
  5. After the user confirms the summarized configuration, create the draft and read it with `review_plan`. Inspect `list_plans` after an uncertain creation response before retrying: plan creation is not idempotent.
52
52
  6. Call `request_plan_authorization({planId,requestId:newUUID})`. Show the exact official `rules`, `warnings` and `reviewUrl`. Only the user opens the owner review, checks Testnet/owner/funding/gas/policy and signs personally. Never confirm through HTTP, browser automation, another MCP or a signing tool on their behalf.
@@ -76,7 +76,7 @@ Explain the current state in one line, then one next step. Never fix a problem b
76
76
  | Situation | State | Next step to offer |
77
77
  | ------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
78
78
  | Owner input balance below one order | blocked | Owner adds the input asset (`demo USDC` or `test SUI`) to the owner wallet, then asks to Resume. Nothing was submitted. |
79
- | Agent gas below 0.01 test SUI | blocked | Owner tops up agent gas through the official Agent Pass page; Agent Pass Plugin never refills gas. Then Resume on request. |
79
+ | Agent gas below 0.01 test SUI | blocked | Owner tops up agent gas through the official Agent Pass page; Senro never refills gas. Then Resume on request. |
80
80
  | Wallet rejected or review page closed | pending | Re-show the same `reviewUrl`; retry with the same `requestId`. No new plan or request. |
81
81
  | Local runtime unreachable (MCP returns "Local runtime unavailable") | unknown | Ask the user to start it (`agent-pass-plugin start` for npm installs, `npm run dev` in a checkout), then retry the exact same call. After restart, running plans are paused. |
82
82
  | Network or RPC interruption | blocked | No new order was sent in that cycle. Check the connection, then Resume on request; submitted digests reconcile automatically. |