@mysten-incubation/sui-agent-pass 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -50,11 +50,11 @@ replacements. See `move/protocols/README.md`.
50
50
  This repository is fully self-contained. There is no broker, authorization database,
51
51
  intent adapter, or transaction builder inside MCP.
52
52
 
53
- ## Install (planned distribution)
53
+ ## Install
54
54
 
55
- Not published yet. Once the package is on npm and the immutable contracts are published on chain,
56
- a user needs no clone, no build, and no toolchain. The client ships the per-network deployment IDs
57
- (`deployments/<network>.json`) and resolves them with `--network`:
55
+ The package is on npm as `@mysten-incubation/sui-agent-pass` (the incubation scope, for the
56
+ dogfood; the launch release will follow). A user needs no clone, no build, and no toolchain. The
57
+ client ships the per-network deployment IDs (`deployments/<network>.json`):
58
58
 
59
59
  ```sh
60
60
  npm install -g @mysten-incubation/sui-agent-pass
package/dist/cli.js CHANGED
@@ -2,9 +2,11 @@
2
2
  // Copyright (c) Mysten Labs, Inc.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import { spawn } from 'node:child_process';
5
+ import { realpathSync } from 'node:fs';
5
6
  import { access, mkdir, readFile, writeFile } from 'node:fs/promises';
6
7
  import { homedir } from 'node:os';
7
8
  import { dirname, join, resolve } from 'node:path';
9
+ import { fileURLToPath } from 'node:url';
8
10
  import { select } from '@inquirer/prompts';
9
11
  import { Command } from 'commander';
10
12
  import { clientFor, readStatus } from './chain.js';
@@ -237,7 +239,10 @@ program
237
239
  if (!http)
238
240
  console.log('\nDone. Open the agent and tell it what to do with your money; it proposes the pass, you review and sign in your wallet, and it acts within the rules. Restart the agent after upgrading this package so it loads the new server.');
239
241
  });
240
- if (process.argv[1] && /(?:^|\/)cli\.(?:ts|js)$/.test(process.argv[1])) {
242
+ // Run only when this file is the entry: directly, through tsx in development, or through the
243
+ // package's `agent-pass` bin, which is a symlink to it.
244
+ const entry = process.argv[1] ? realpathSync(process.argv[1]) : '';
245
+ if (entry === fileURLToPath(import.meta.url) || /(?:^|\/)cli\.(?:ts|js)$/.test(entry)) {
241
246
  program.parseAsync().catch((error) => {
242
247
  console.error(error.message);
243
248
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten-incubation/sui-agent-pass",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "AI builds transactions. A session signer signs. Your pass enforces the rules.",
6
6
  "repository": {