@aixyz/cli 0.18.0 → 0.19.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aixyz/cli",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Payment-native SDK for AI Agent",
5
5
  "keywords": [
6
6
  "ai",
@@ -28,8 +28,8 @@
28
28
  "bin.ts"
29
29
  ],
30
30
  "dependencies": {
31
- "@aixyz/config": "0.18.0",
32
- "@aixyz/erc-8004": "0.18.0",
31
+ "@aixyz/config": "0.19.0",
32
+ "@aixyz/erc-8004": "0.19.0",
33
33
  "@inquirer/prompts": "^8.3.0",
34
34
  "@next/env": "^16.1.6",
35
35
  "boxen": "^8.0.1",
@@ -91,6 +91,16 @@ export async function register(options: RegisterOptions): Promise<void> {
91
91
  }
92
92
  printTxDetails("Transaction details (dry-run)");
93
93
  console.log("Dry-run complete. To sign and broadcast, re-run with --broadcast.");
94
+ const sq = (v: string) => `'${v.replace(/'/g, `'\\''`)}'`;
95
+ const rerunParts = [`aixyz erc-8004 register`, `--url ${sq(agentUrl)}`, `--chain-id ${chainId}`];
96
+ if (options.rpcUrl) rerunParts.push(`--rpc-url ${sq(options.rpcUrl)}`);
97
+ rerunParts.push(`--registry ${sq(registryAddress)}`);
98
+ if (options.keystore) rerunParts.push(`--keystore ${sq(options.keystore)}`);
99
+ if (options.browser) rerunParts.push("--browser");
100
+ if (options.outDir) rerunParts.push(`--out-dir ${sq(options.outDir)}`);
101
+ if (options.supportedTrust) rerunParts.push(`--supported-trust ${sq(options.supportedTrust)}`);
102
+ rerunParts.push("--broadcast");
103
+ console.log(rerunParts.join(" "));
94
104
  return;
95
105
  }
96
106
 
@@ -91,6 +91,14 @@ export async function update(options: UpdateOptions): Promise<void> {
91
91
  }
92
92
  printTxDetails("Transaction details (dry-run)");
93
93
  console.log("Dry-run complete. To sign and broadcast, re-run with --broadcast.");
94
+ const sq = (v: string) => `'${v.replace(/'/g, `'\\''`)}'`;
95
+ const rerunParts = [`aixyz erc-8004 update`, `--url ${sq(agentUrl)}`, `--agent-id ${selected.agentId}`];
96
+ if (options.rpcUrl) rerunParts.push(`--rpc-url ${sq(options.rpcUrl)}`);
97
+ if (options.keystore) rerunParts.push(`--keystore ${sq(options.keystore)}`);
98
+ if (options.browser) rerunParts.push("--browser");
99
+ if (options.outDir) rerunParts.push(`--out-dir ${sq(options.outDir)}`);
100
+ rerunParts.push("--broadcast");
101
+ console.log(rerunParts.join(" "));
94
102
  return;
95
103
  }
96
104
 
@@ -38,8 +38,8 @@ export async function selectWalletMethod(options: WalletOptions): Promise<Wallet
38
38
  return withTTY(async () => {
39
39
  const localWalletExists = hasLocalWallet();
40
40
  const choices = [
41
- { name: "Keystore file", value: "keystore" },
42
41
  { name: "Browser wallet (any EIP-6963 compatible wallets)", value: "browser" },
42
+ { name: "Keystore file", value: "keystore" },
43
43
  { name: "Private key (not recommended)", value: "privatekey" },
44
44
  ...(localWalletExists ? [{ name: "Local wallet (.aixyz/wallet.json)", value: "local" }] : []),
45
45
  ];
@@ -47,6 +47,7 @@ export async function selectWalletMethod(options: WalletOptions): Promise<Wallet
47
47
  const method = await select({
48
48
  message: "Select signing method:",
49
49
  choices,
50
+ default: "browser",
50
51
  });
51
52
 
52
53
  switch (method) {