@mysten-incubation/sui-agent-pass 0.1.17 → 0.1.18
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/README.md +17 -6
- package/deployments/README.md +7 -3
- package/dist/cli.js +2 -2
- package/dist/deployments.js +80 -0
- package/dist/plugin.js +22 -58
- package/docs/PLAYBOOK.md +6 -1
- package/package.json +1 -1
- package/skills/agent-pass/SKILL.md +6 -1
package/README.md
CHANGED
|
@@ -169,7 +169,8 @@ and MCP signing. For the wallet connection/signature flow use the flow below.
|
|
|
169
169
|
|
|
170
170
|
Use a deployed configuration, or `npm run devnet -- --owner <address>`, which publishes to
|
|
171
171
|
devnet with a faucet-funded publisher, funds your wallet address from the faucet and writes the
|
|
172
|
-
deployment to
|
|
172
|
+
deployment to `.local/devnet/deployment.json`. Tell the agent to pass that file's absolute path
|
|
173
|
+
as `deployment` when proposing a pass. Slush offers
|
|
173
174
|
mainnet, testnet and devnet only. `npm run demo -- --wallet` keeps a localnet alive and prints a
|
|
174
175
|
funded throwaway owner key for a wallet that accepts a custom RPC URL; not verified with any.
|
|
175
176
|
|
|
@@ -181,7 +182,7 @@ npm run deploy -- create --directory .local/testnet
|
|
|
181
182
|
# Fund it with at least 11 test SUI, then:
|
|
182
183
|
npm run deploy -- resume --directory .local/testnet
|
|
183
184
|
|
|
184
|
-
#
|
|
185
|
+
# Select a private deployment explicitly for each new pass:
|
|
185
186
|
node dist/cli.js connect # then ask the agent; it passes deployment: .local/testnet/deployment.json
|
|
186
187
|
# devnet works the same way:
|
|
187
188
|
npm run deploy -- create --network devnet --directory .local/devnet
|
|
@@ -239,12 +240,12 @@ terminal.
|
|
|
239
240
|
cd ~/github/sui-agent-vault
|
|
240
241
|
npm ci && npm run toolchain && npm run build
|
|
241
242
|
# Publish with a faucet-funded key, fund your Slush address from the faucet, and write
|
|
242
|
-
#
|
|
243
|
+
# .local/devnet/deployment.json (the command prints its absolute path):
|
|
243
244
|
npm run devnet -- --owner <your Slush address>
|
|
244
245
|
cd ~/anywhere && claude --plugin-dir ~/github/sui-agent-vault/plugin
|
|
245
246
|
```
|
|
246
247
|
|
|
247
|
-
Then
|
|
248
|
+
Then tell Claude Code to use the printed deployment path for this rehearsal, and ask:
|
|
248
249
|
|
|
249
250
|
> Manage 1 SUI and 100 USDC for me. Sell at most 0.1 SUI a day on DeepBook, never below
|
|
250
251
|
> 1.8 USDC. You may pay alice (0x…) up to 10 USDC a time and 20 a day. One week.
|
|
@@ -259,8 +260,18 @@ guidance Claude follows is [`docs/PLAYBOOK.md`](docs/PLAYBOOK.md), which the MCP
|
|
|
259
260
|
client as the `agent-pass://playbook` resource; the plugin skills only point at it.
|
|
260
261
|
|
|
261
262
|
The MCP is `node dist/cli.js mcp`. It keeps sessions under `~/.sui-agent-pass/sessions/` and
|
|
262
|
-
|
|
263
|
-
`propose_authorization
|
|
263
|
+
uses the deployments bundled with npm. Custom deployments require an explicit `deployment`
|
|
264
|
+
path on `propose_authorization`, or `agent-pass mcp --deployment /absolute/path/deployment.json`.
|
|
265
|
+
For development, use `--root /absolute/path/development-sessions` to keep sessions separate.
|
|
266
|
+
If a network and custom file are both selected, their networks must match.
|
|
267
|
+
|
|
268
|
+
An old `~/.sui-agent-pass/deployment.json` is no longer loaded automatically. If one remains,
|
|
269
|
+
`list_passes` reports a migration message, and proposals without an explicit network or custom
|
|
270
|
+
deployment stop rather than silently choosing another network. Archive the old file if it is
|
|
271
|
+
obsolete, or select it explicitly if it is still needed. Existing sessions keep their own
|
|
272
|
+
deployment; upgrades can refresh addresses only within the same network and original package.
|
|
273
|
+
|
|
274
|
+
The plugin and Claude Code run as the same OS user: the session key
|
|
264
275
|
is not hidden from Claude by the operating system, and the on-chain rules are the boundary.
|
|
265
276
|
|
|
266
277
|
## The site
|
package/deployments/README.md
CHANGED
|
@@ -7,7 +7,11 @@ One `deployment.json` per public network, committed here and shipped in the npm
|
|
|
7
7
|
`files` field in `package.json`). Each records the published package and object IDs, the gRPC URL
|
|
8
8
|
and the chain identifier for that network. The stdio server loads one of these when
|
|
9
9
|
the agent names a `network` in `propose_authorization`, so an installed client needs no local
|
|
10
|
-
publish
|
|
10
|
+
publish. A custom deployment requires an explicit tool `deployment` path or server
|
|
11
|
+
`--deployment`; when a network is also supplied, it must match the file. A legacy
|
|
12
|
+
`~/.sui-agent-pass/deployment.json` is never loaded automatically: it triggers a migration
|
|
13
|
+
message and blocks proposals without an explicit selection until the owner chooses a network
|
|
14
|
+
or custom file, or archives the obsolete file. Existing sessions keep their deployment.
|
|
11
15
|
|
|
12
16
|
`mainnet.json` is the mainnet test copy of the package (`0x389b5817…063f`, published
|
|
13
17
|
2026-10-28 from the code that will launch, caps with its publisher), for dogfooding with small
|
|
@@ -17,8 +21,8 @@ the hosted site. `testnet.json` is the same code, published to testnet on 2026-1
|
|
|
17
21
|
stand-ins with 2 SUI of depth, so dogfooders get transfers and staking there and trade on
|
|
18
22
|
mainnet. The stand-in pools stay on chain, and the previous revision of this file in git keeps
|
|
19
23
|
their ids; the tests publish their own stand-ins. Any Move change means a new publish and a new
|
|
20
|
-
file here. `npm run devnet` publishes to devnet and writes its
|
|
21
|
-
`deployment.json` for
|
|
24
|
+
file here. `npm run devnet` publishes to devnet and writes its project-local
|
|
25
|
+
`deployment.json` for explicit selection; `npm run deploy -- create --network <name>` publishes to
|
|
22
26
|
testnet or devnet. At launch, commit the resulting `deployment.json` here as `<name>.json`.
|
|
23
27
|
|
|
24
28
|
The site build (`npm run build`) copies these files into `web-dist/deployments/`, so the hosted
|
package/dist/cli.js
CHANGED
|
@@ -61,8 +61,8 @@ program
|
|
|
61
61
|
program
|
|
62
62
|
.command('mcp')
|
|
63
63
|
.description('Stdio MCP for the Claude Code plugin: propose, watch, sign for and revoke passes')
|
|
64
|
-
.option('--root <directory>', '
|
|
65
|
-
.option('--deployment <path>', 'deployment
|
|
64
|
+
.option('--root <directory>', 'Session storage directory', defaultRoot())
|
|
65
|
+
.option('--deployment <path>', 'Explicit custom deployment for development; otherwise use bundled networks')
|
|
66
66
|
.option('--no-open', 'Do not open the browser for owner pages')
|
|
67
67
|
.option('--http <port>', 'Serve on a local HTTP endpoint instead of stdio; writes url and bearer token to <root>/mcp-http.json')
|
|
68
68
|
.action(async (o) => {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { lstat, readFile } from 'node:fs/promises';
|
|
4
|
+
import { join, resolve } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { normalizeSuiAddress } from '@mysten/sui/utils';
|
|
7
|
+
import { DeploymentSchema } from './domain.js';
|
|
8
|
+
const exists = (path) => lstat(path).then(() => true, (error) => {
|
|
9
|
+
if (error.code === 'ENOENT')
|
|
10
|
+
return false;
|
|
11
|
+
throw error;
|
|
12
|
+
});
|
|
13
|
+
const read = async (path) => DeploymentSchema.parse(JSON.parse(await readFile(path, 'utf8')));
|
|
14
|
+
/** Bundled network records and explicitly selected development deployments. No chain access. */
|
|
15
|
+
export class Deployments {
|
|
16
|
+
root;
|
|
17
|
+
configured;
|
|
18
|
+
constructor(root, configured) {
|
|
19
|
+
this.root = root;
|
|
20
|
+
this.configured = configured;
|
|
21
|
+
}
|
|
22
|
+
path(override) {
|
|
23
|
+
const path = override ?? this.configured;
|
|
24
|
+
return path === undefined ? undefined : resolve(path);
|
|
25
|
+
}
|
|
26
|
+
/** Never parse an old implicit override, even when it is malformed or from an older release. */
|
|
27
|
+
async migrationNotice() {
|
|
28
|
+
const legacy = join(this.root, 'deployment.json');
|
|
29
|
+
if (this.configured !== undefined || !(await exists(legacy)))
|
|
30
|
+
return;
|
|
31
|
+
return `An old deployment override exists at ${legacy}. It is no longer loaded automatically. Before creating a new pass, ask the owner to choose a bundled network explicitly, or select the custom file with deployment (or start MCP with --deployment). Do not choose a different network on their behalf. Archive the old file when it is no longer needed. Existing passes keep their deployment.`;
|
|
32
|
+
}
|
|
33
|
+
bundledPath(network) {
|
|
34
|
+
return fileURLToPath(new URL(`../deployments/${network}.json`, import.meta.url));
|
|
35
|
+
}
|
|
36
|
+
async bundledNetworks() {
|
|
37
|
+
const all = ['mainnet', 'testnet', 'devnet'];
|
|
38
|
+
const present = await Promise.all(all.map((n) => exists(this.bundledPath(n))));
|
|
39
|
+
return all.filter((_, i) => present[i]);
|
|
40
|
+
}
|
|
41
|
+
async bundled(network) {
|
|
42
|
+
return read(this.bundledPath(network));
|
|
43
|
+
}
|
|
44
|
+
/** An explicit file, otherwise a bundled network. Conflicting choices never switch networks. */
|
|
45
|
+
async load(override, network) {
|
|
46
|
+
const path = this.path(override);
|
|
47
|
+
if (path !== undefined) {
|
|
48
|
+
const d = await read(path);
|
|
49
|
+
if (network !== undefined && network !== d.network)
|
|
50
|
+
throw new Error(`Deployment ${path} is for ${d.network}, but ${network} was requested. Select a matching deployment or remove the custom deployment selection to use a bundled network.`);
|
|
51
|
+
return d;
|
|
52
|
+
}
|
|
53
|
+
if (network === undefined) {
|
|
54
|
+
const notice = await this.migrationNotice();
|
|
55
|
+
if (notice)
|
|
56
|
+
throw new Error(notice);
|
|
57
|
+
}
|
|
58
|
+
const bundled = await this.bundledNetworks();
|
|
59
|
+
const chosen = network ?? bundled[0];
|
|
60
|
+
if (!chosen || !bundled.includes(chosen))
|
|
61
|
+
throw new Error(`No bundled deployment for ${network ?? 'any network'}: this package ships ${bundled.join(', ') || 'none'}. For a custom deployment, supply its path explicitly with deployment or --deployment.`);
|
|
62
|
+
return this.bundled(chosen);
|
|
63
|
+
}
|
|
64
|
+
/** Refresh an existing session only within its original network and package. */
|
|
65
|
+
async current(network, packageId) {
|
|
66
|
+
const path = this.path();
|
|
67
|
+
const candidates = [
|
|
68
|
+
...(path === undefined ? [] : [() => read(path)]),
|
|
69
|
+
() => this.bundled(network),
|
|
70
|
+
];
|
|
71
|
+
for (const read of candidates) {
|
|
72
|
+
const d = await read().catch(() => null);
|
|
73
|
+
if (d &&
|
|
74
|
+
d.network === network &&
|
|
75
|
+
normalizeSuiAddress(d.packageId) === normalizeSuiAddress(packageId))
|
|
76
|
+
return d;
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
package/dist/plugin.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { spawn } from 'node:child_process';
|
|
10
10
|
import { randomUUID } from 'node:crypto';
|
|
11
|
-
import {
|
|
11
|
+
import { mkdir, readdir, writeFile } from 'node:fs/promises';
|
|
12
12
|
import { createServer } from 'node:http';
|
|
13
13
|
import { homedir } from 'node:os';
|
|
14
14
|
import { basename, dirname, join, resolve } from 'node:path';
|
|
@@ -21,8 +21,9 @@ import { Transaction } from '@mysten/sui/transactions';
|
|
|
21
21
|
import { fromBase64, normalizeSuiAddress } from '@mysten/sui/utils';
|
|
22
22
|
import { z } from 'zod';
|
|
23
23
|
import { clientFor, deepbookSizes, findPools, quoteSwap, readAllHoldings, readHoldings, readStatus, withMarketFacts, } from './chain.js';
|
|
24
|
+
import { Deployments } from './deployments.js';
|
|
24
25
|
import { describePolicy, describeSetup, renderRows } from './describe.js';
|
|
25
|
-
import { address, coinBySymbol, coinInfo, connects, DAY_MS, defaultGasDaily,
|
|
26
|
+
import { address, coinBySymbol, coinInfo, connects, DAY_MS, defaultGasDaily, display, isStable, limitUnits, MAX_TERM_DAYS, poolsFor, recipientName, requiredSui, sameCoin, SetupSchema, showCoin, SUI, uncovered, units, VenueSchema, } from './domain.js';
|
|
26
27
|
import { passIdOf } from './explorer.js';
|
|
27
28
|
import { passEnded, returnGasFloat } from './float.js';
|
|
28
29
|
import { failure, INSTRUCTIONS, keyAlert, MAX_TOOL_INPUT_ELEMENTS, registerDocs, result, serverInfo, sessionInfo, SIGN_ANNOTATIONS, SIGN_DESCRIPTION, } from './mcp.js';
|
|
@@ -46,13 +47,14 @@ export function cliInvocation() {
|
|
|
46
47
|
? [process.execPath, entry]
|
|
47
48
|
: [join(repoRoot, 'node_modules/.bin/tsx'), entry.replace(/\.js$/, '.ts')];
|
|
48
49
|
}
|
|
49
|
-
const exists = (path) => access(path).then(() => true, () => false);
|
|
50
50
|
/** Every session directory under the root, opened lazily and kept for the process lifetime. */
|
|
51
51
|
class Registry {
|
|
52
52
|
options;
|
|
53
53
|
sessions = new Map();
|
|
54
|
+
deployments;
|
|
54
55
|
constructor(options) {
|
|
55
56
|
this.options = options;
|
|
57
|
+
this.deployments = new Deployments(options.root, options.deployment);
|
|
56
58
|
}
|
|
57
59
|
get sessionsDir() {
|
|
58
60
|
return join(this.options.root, 'sessions');
|
|
@@ -74,7 +76,7 @@ class Registry {
|
|
|
74
76
|
try {
|
|
75
77
|
this.sessions.set(id, {
|
|
76
78
|
id,
|
|
77
|
-
store: await SessionStore.open(join(this.sessionsDir, id), (network, packageId) => this.current(network, packageId)),
|
|
79
|
+
store: await SessionStore.open(join(this.sessionsDir, id), (network, packageId) => this.deployments.current(network, packageId)),
|
|
78
80
|
});
|
|
79
81
|
this.unreadable.delete(id);
|
|
80
82
|
}
|
|
@@ -138,33 +140,6 @@ class Registry {
|
|
|
138
140
|
async close() {
|
|
139
141
|
await Promise.all([...this.sessions.values()].map((s) => s.server?.close()));
|
|
140
142
|
}
|
|
141
|
-
deploymentPath(override) {
|
|
142
|
-
return resolve(override ?? this.options.deployment ?? join(this.options.root, 'deployment.json'));
|
|
143
|
-
}
|
|
144
|
-
/** The networks this package ships a deployment for, in the order a new pass defaults to. */
|
|
145
|
-
async bundledNetworks() {
|
|
146
|
-
const all = ['mainnet', 'testnet', 'devnet'];
|
|
147
|
-
const present = await Promise.all(all.map((n) => exists(this.bundledPath(n))));
|
|
148
|
-
return all.filter((_, i) => present[i]);
|
|
149
|
-
}
|
|
150
|
-
bundledPath(network) {
|
|
151
|
-
return fileURLToPath(new URL(`../deployments/${network}.json`, import.meta.url));
|
|
152
|
-
}
|
|
153
|
-
/** Today's deployment for a network when it is the same package: the private file first, else the bundled one. */
|
|
154
|
-
async current(network, packageId) {
|
|
155
|
-
const candidates = [
|
|
156
|
-
() => this.deployment().catch(() => null),
|
|
157
|
-
() => this.bundled(network).catch(() => null),
|
|
158
|
-
];
|
|
159
|
-
for (const read of candidates) {
|
|
160
|
-
const d = await read();
|
|
161
|
-
if (d &&
|
|
162
|
-
d.network === network &&
|
|
163
|
-
normalizeSuiAddress(d.packageId) === normalizeSuiAddress(packageId))
|
|
164
|
-
return d;
|
|
165
|
-
}
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
143
|
/**
|
|
169
144
|
* Retires a session directory once its pass is over: refuses while the pass is live, returns
|
|
170
145
|
* the key's gas float to the owner first, then deletes the directory and its key. Works on a
|
|
@@ -175,7 +150,9 @@ class Registry {
|
|
|
175
150
|
const session = this.sessions.get(id);
|
|
176
151
|
const peek = await SessionStore.peek(dir);
|
|
177
152
|
const d = session?.store.state.deployment ??
|
|
178
|
-
(peek.network && peek.packageId
|
|
153
|
+
(peek.network && peek.packageId
|
|
154
|
+
? await this.deployments.current(peek.network, peek.packageId)
|
|
155
|
+
: null);
|
|
179
156
|
if (peek.passId) {
|
|
180
157
|
if (!d)
|
|
181
158
|
throw new Error('No deployment known for this session; cannot tell whether its pass is live');
|
|
@@ -191,24 +168,6 @@ class Registry {
|
|
|
191
168
|
await SessionStore.forget(dir);
|
|
192
169
|
return { swept };
|
|
193
170
|
}
|
|
194
|
-
async bundled(network) {
|
|
195
|
-
return DeploymentSchema.parse(JSON.parse(await readFile(this.bundledPath(network), 'utf8')));
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Where a new pass goes: an explicit file, else the private `deployment.json` under the root
|
|
199
|
-
* (a publish of one's own), else the deployment bundled for `network`, else the first bundled
|
|
200
|
-
* one. A user who installed the package has only the bundled ones and needs no file.
|
|
201
|
-
*/
|
|
202
|
-
async deployment(override, network) {
|
|
203
|
-
const configured = this.deploymentPath(override);
|
|
204
|
-
if (override || this.options.deployment || (await exists(configured)))
|
|
205
|
-
return DeploymentSchema.parse(JSON.parse(await readFile(configured, 'utf8')));
|
|
206
|
-
const bundled = await this.bundledNetworks();
|
|
207
|
-
const chosen = network ?? bundled[0];
|
|
208
|
-
if (!chosen || !(network === undefined || bundled.includes(network)))
|
|
209
|
-
throw new Error(`No deployment for ${network ?? 'any network'}: this package ships ${bundled.join(', ') || 'none'}, and there is no ${configured}.`);
|
|
210
|
-
return this.bundled(chosen);
|
|
211
|
-
}
|
|
212
171
|
}
|
|
213
172
|
const decimal = z.string().regex(/^[0-9]+(\.[0-9]+)?$/, 'decimal number');
|
|
214
173
|
const symbol = z
|
|
@@ -429,7 +388,8 @@ export function createPluginMcp(registry) {
|
|
|
429
388
|
},
|
|
430
389
|
annotations: { readOnlyHint: true },
|
|
431
390
|
}, async ({ owner }) => {
|
|
432
|
-
const path = registry.
|
|
391
|
+
const path = registry.deployments.path();
|
|
392
|
+
const migration = await registry.deployments.migrationNotice();
|
|
433
393
|
const markets = async (d) => ({
|
|
434
394
|
network: d.network,
|
|
435
395
|
maxTermDays: d.maxTermDays,
|
|
@@ -451,8 +411,8 @@ export function createPluginMcp(registry) {
|
|
|
451
411
|
? { ownerCoins: await readAllHoldings(clientFor(d), d, owner).catch(() => null) }
|
|
452
412
|
: {}),
|
|
453
413
|
});
|
|
454
|
-
const own =
|
|
455
|
-
const bundled = await Promise.all((await registry.bundledNetworks()).map(async (n) => markets(await registry.bundled(n))));
|
|
414
|
+
const own = path === undefined ? [] : [await markets(await registry.deployments.load())];
|
|
415
|
+
const bundled = await Promise.all((await registry.deployments.bundledNetworks()).map(async (n) => markets(await registry.deployments.bundled(n))));
|
|
456
416
|
const passes = await Promise.all((await registry.all()).map(summaryWithChain));
|
|
457
417
|
const unreadable = [...registry.unreadable.values()];
|
|
458
418
|
return result({
|
|
@@ -463,7 +423,11 @@ export function createPluginMcp(registry) {
|
|
|
463
423
|
unreadableNote: 'These sessions were written by an earlier version of this package and cannot be used from here. Their passes may still be live: tell the owner, and have them stop or close each one from the pass page of the site (#/pass/<passId>), which reads the chain and needs no session file.',
|
|
464
424
|
}
|
|
465
425
|
: {}),
|
|
466
|
-
deployment: {
|
|
426
|
+
deployment: {
|
|
427
|
+
source: path === undefined ? 'bundled' : 'custom',
|
|
428
|
+
...(path === undefined ? {} : { path }),
|
|
429
|
+
...(migration ? { migration } : {}),
|
|
430
|
+
},
|
|
467
431
|
server: await serverInfo(),
|
|
468
432
|
networks: [...own, ...bundled.filter((b) => !own.some((o) => o.network === b.network))],
|
|
469
433
|
});
|
|
@@ -481,7 +445,7 @@ export function createPluginMcp(registry) {
|
|
|
481
445
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
482
446
|
}, async ({ coin, with: other, network }) => {
|
|
483
447
|
try {
|
|
484
|
-
const d0 = await registry.
|
|
448
|
+
const d0 = await registry.deployments.load(undefined, network);
|
|
485
449
|
const type = (s) => (/::/.test(s) ? s : coinBySymbol(d0, s).type);
|
|
486
450
|
const { d, found } = await findPools(clientFor(d0), d0, type(coin), other ? type(other) : undefined);
|
|
487
451
|
const priced = await Promise.all(found.map(async ({ pool, tvlUsd }) => ({
|
|
@@ -526,11 +490,11 @@ export function createPluginMcp(registry) {
|
|
|
526
490
|
network: z
|
|
527
491
|
.enum(['mainnet', 'testnet', 'devnet', 'localnet'])
|
|
528
492
|
.optional()
|
|
529
|
-
.describe('which network the pass lives on, from the deployments this package ships; omit for the
|
|
493
|
+
.describe('which network the pass lives on, from the deployments this package ships; omit for the explicitly configured deployment or first shipped network. If list_passes reports a deployment migration, ask the owner to choose before proposing. Must match any explicitly selected deployment.'),
|
|
530
494
|
deployment: z
|
|
531
495
|
.string()
|
|
532
496
|
.optional()
|
|
533
|
-
.describe('path of a
|
|
497
|
+
.describe('explicit path of a custom deployment.json; must match network when both are supplied'),
|
|
534
498
|
owner: address
|
|
535
499
|
.optional()
|
|
536
500
|
.describe("the owner's address, when they gave it: adds warnings where the caps reach past what they hold, or when they cannot sign yet"),
|
|
@@ -538,7 +502,7 @@ export function createPluginMcp(registry) {
|
|
|
538
502
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
539
503
|
}, async ({ deployment, network, owner, ...input }) => {
|
|
540
504
|
try {
|
|
541
|
-
const d0 = await registry.
|
|
505
|
+
const d0 = await registry.deployments.load(deployment, network);
|
|
542
506
|
const { setup, d } = await toSetup(clientFor(d0), d0, input);
|
|
543
507
|
const session = await registry.create(d, setup);
|
|
544
508
|
const { ownerUrl } = await registry.server(session);
|
package/docs/PLAYBOOK.md
CHANGED
|
@@ -110,7 +110,12 @@ ask for a yes, unless they already stated every rule explicitly.
|
|
|
110
110
|
machine. A per-session HTTP signer has only `session_info` and `sign_transaction`.
|
|
111
111
|
|
|
112
112
|
The pass goes on the network the owner names (`network`, one of `list_passes.networks`), else on
|
|
113
|
-
the first network listed. A private publish of one's own takes
|
|
113
|
+
the first network listed. A private publish of one's own takes an explicit `deployment` path
|
|
114
|
+
instead (or the server starts with `--deployment`). If both a file and a network are selected,
|
|
115
|
+
they must match. A file left at `~/.sui-agent-pass/deployment.json` is never loaded automatically.
|
|
116
|
+
If `list_passes.deployment.migration` is present, show it and ask the owner which network or
|
|
117
|
+
custom deployment to use before making a new proposal. Never pick a network or change files
|
|
118
|
+
just to clear that message. Existing passes retain their deployment.
|
|
114
119
|
|
|
115
120
|
Call `propose_authorization` with the rules. It returns `rules`, the exact text the review page
|
|
116
121
|
shows, plus `reviewUrl` and `sessionAddress`, and opens the page in the browser. Paste `rules` to
|
package/package.json
CHANGED
|
@@ -115,7 +115,12 @@ ask for a yes, unless they already stated every rule explicitly.
|
|
|
115
115
|
machine. A per-session HTTP signer has only `session_info` and `sign_transaction`.
|
|
116
116
|
|
|
117
117
|
The pass goes on the network the owner names (`network`, one of `list_passes.networks`), else on
|
|
118
|
-
the first network listed. A private publish of one's own takes
|
|
118
|
+
the first network listed. A private publish of one's own takes an explicit `deployment` path
|
|
119
|
+
instead (or the server starts with `--deployment`). If both a file and a network are selected,
|
|
120
|
+
they must match. A file left at `~/.sui-agent-pass/deployment.json` is never loaded automatically.
|
|
121
|
+
If `list_passes.deployment.migration` is present, show it and ask the owner which network or
|
|
122
|
+
custom deployment to use before making a new proposal. Never pick a network or change files
|
|
123
|
+
just to clear that message. Existing passes retain their deployment.
|
|
119
124
|
|
|
120
125
|
Call `propose_authorization` with the rules. It returns `rules`, the exact text the review page
|
|
121
126
|
shows, plus `reviewUrl` and `sessionAddress`, and opens the page in the browser. Paste `rules` to
|