@mysten-incubation/sui-agent-pass 0.1.31 → 0.1.32

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/dist/plugin.js CHANGED
@@ -28,7 +28,7 @@ import { address, coinBySymbol, coinInfo, connects, DAY_MS, defaultGasDaily, dis
28
28
  import { findPassByAgent, passIdOf } from './explorer.js';
29
29
  import { passEnded, returnGasFloat } from './float.js';
30
30
  import { failure, INSTRUCTIONS, keyAlert, MAX_TOOL_INPUT_ELEMENTS, registerDocs, result, serverInfo, sessionInfo, SIGN_ANNOTATIONS, SIGN_DESCRIPTION, } from './mcp.js';
31
- import { authenticated, body, ownerPageUrl, startServer } from './server.js';
31
+ import { authenticated, body, ownerPageUrl, passPageUrl, startServer } from './server.js';
32
32
  import { SessionSigner } from './signer.js';
33
33
  import { SessionStore, token } from './storage.js';
34
34
  export const defaultRoot = () => join(homedir(), '.sui-agent-pass');
@@ -762,13 +762,15 @@ export function createPluginMcp(registry) {
762
762
  throw new Error('No pass for this key is on chain; nothing to resign from');
763
763
  // The key's remaining gas goes back to the owner in the same transaction.
764
764
  const swept = await returnGasFloat(client, store.directory, sessionAddress, hit.owner, (tx) => resignCall(tx, d, hit.id));
765
+ const { origin } = await registry.server(session);
765
766
  return result({
766
767
  pass: session.id,
767
768
  passId: hit.id,
768
769
  digest: swept.digest,
769
770
  gasReturned: swept.amount,
770
771
  status: 'revoked',
771
- next: 'The key can no longer act and its gas is back with the owner. Tell them the pass is stopped and that closing it from its page refunds the storage deposit; forget_pass then deletes this session.',
772
+ passUrl: passPageUrl(d, origin, hit.id),
773
+ next: 'The key can no longer act under the rules and its gas is back with the owner. Send them passUrl and ask them to close the pass there when convenient: that deletes the allowances, including the gas allowance this key could still draw on up to its cap, and refunds the storage deposit. Then call forget_pass to delete this session.',
772
774
  });
773
775
  }
774
776
  catch (error) {
package/docs/PLAYBOOK.md CHANGED
@@ -244,10 +244,12 @@ There are two ways a pass ends, and you should know which one you are in.
244
244
  **You end it.** This is the normal ending. When the work is done and nothing recurring remains,
245
245
  or the owner tells you to stop, call `resign_pass`: one transaction from your own key, no owner
246
246
  signature. It ends your authority on chain (every later action is refused) and returns the key's
247
- remaining gas to the owner in the same transaction, so nothing of theirs stays with you. Tell the
248
- owner the pass is stopped and that closing it from its page deletes the allowances and refunds
249
- the storage deposit; those are their objects, which only their signature can remove. Resigning
250
- is irreversible; a new pass needs a new proposal. Then call `forget_pass` for the session, which
247
+ remaining gas to the owner in the same transaction, so nothing of theirs stays with you. It
248
+ returns `passUrl`: send it to the owner and ask them to close the pass there when convenient.
249
+ That deletes the allowances and refunds the storage deposit, and it matters beyond tidiness: the
250
+ gas allowance has no policy, so until it is deleted the key could still draw on it up to its
251
+ cap. Those are the owner's objects, which only their signature can remove. Resigning is
252
+ irreversible; a new pass needs a new proposal. Then call `forget_pass` for the session, which
251
253
  deletes the session directory and its key.
252
254
 
253
255
  **The owner ends it.** When something is wrong on their side, the owner stops or closes the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten-incubation/sui-agent-pass",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "description": "AI builds transactions. A session signer signs. Your pass enforces the rules.",
6
6
  "repository": {
@@ -249,10 +249,12 @@ There are two ways a pass ends, and you should know which one you are in.
249
249
  **You end it.** This is the normal ending. When the work is done and nothing recurring remains,
250
250
  or the owner tells you to stop, call `resign_pass`: one transaction from your own key, no owner
251
251
  signature. It ends your authority on chain (every later action is refused) and returns the key's
252
- remaining gas to the owner in the same transaction, so nothing of theirs stays with you. Tell the
253
- owner the pass is stopped and that closing it from its page deletes the allowances and refunds
254
- the storage deposit; those are their objects, which only their signature can remove. Resigning
255
- is irreversible; a new pass needs a new proposal. Then call `forget_pass` for the session, which
252
+ remaining gas to the owner in the same transaction, so nothing of theirs stays with you. It
253
+ returns `passUrl`: send it to the owner and ask them to close the pass there when convenient.
254
+ That deletes the allowances and refunds the storage deposit, and it matters beyond tidiness: the
255
+ gas allowance has no policy, so until it is deleted the key could still draw on it up to its
256
+ cap. Those are the owner's objects, which only their signature can remove. Resigning is
257
+ irreversible; a new pass needs a new proposal. Then call `forget_pass` for the session, which
256
258
  deletes the session directory and its key.
257
259
 
258
260
  **The owner ends it.** When something is wrong on their side, the owner stops or closes the