@mysten-incubation/sui-agent-pass 0.1.13 → 0.1.14

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
@@ -59,11 +59,18 @@ class Registry {
59
59
  }
60
60
  /** Sessions on disk this code cannot open, with what their files still say about the pass. */
61
61
  unreadable = new Map();
62
+ /**
63
+ * Every session on disk, each re-read: another process (the one whose watcher saw the owner
64
+ * sign, a later connect) may have changed a session file since this one loaded it.
65
+ */
62
66
  async all() {
63
67
  await mkdir(this.sessionsDir, { recursive: true, mode: 0o700 });
64
68
  for (const id of (await readdir(this.sessionsDir)).sort()) {
65
- if (this.sessions.has(id))
69
+ const known = this.sessions.get(id);
70
+ if (known) {
71
+ await known.store.refresh().catch(() => { });
66
72
  continue;
73
+ }
67
74
  try {
68
75
  this.sessions.set(id, {
69
76
  id,
package/dist/server.js CHANGED
@@ -219,7 +219,10 @@ export async function startServer(store, port = 0) {
219
219
  sessionAddress: store.state.sessionAddress,
220
220
  setup: store.state.setup,
221
221
  }),
222
- passUrl: store.state.active ? passPageUrl(d, origin, store.state.active.passId) : null,
222
+ // Read on use: the activation that makes a pass page exist lands after the server starts.
223
+ get passUrl() {
224
+ return store.state.active ? passPageUrl(d, origin, store.state.active.passId) : null;
225
+ },
223
226
  mcpUrl: `${origin}/mcp`,
224
227
  close: () => new Promise((resolve, reject) => {
225
228
  closed = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten-incubation/sui-agent-pass",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "description": "AI builds transactions. A session signer signs. Your pass enforces the rules.",
6
6
  "repository": {