@sherwoodagent/cli 0.8.0 → 0.9.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/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  queryApprovals,
11
11
  queryJoinRequests,
12
12
  revokeAttestation
13
- } from "./chunk-VQP4XR67.js";
13
+ } from "./chunk-HKZONPXW.js";
14
14
  import {
15
15
  approveDepositor,
16
16
  deposit,
@@ -28,7 +28,7 @@ import {
28
28
  setTextRecord,
29
29
  setVaultAddress,
30
30
  simulateBatch
31
- } from "./chunk-ARZIQ7YZ.js";
31
+ } from "./chunk-Q37V65B6.js";
32
32
  import {
33
33
  AGENT_REGISTRY,
34
34
  EAS_SCHEMAS,
@@ -44,7 +44,7 @@ import {
44
44
  UNISWAP_QUOTER_V2_ABI,
45
45
  VENICE,
46
46
  VENICE_STAKING_ABI
47
- } from "./chunk-BXUNWV52.js";
47
+ } from "./chunk-OUES74ID.js";
48
48
  import {
49
49
  VALID_NETWORKS,
50
50
  cacheGroupId,
@@ -934,7 +934,7 @@ function registerVeniceCommands(program2) {
934
934
  [assetAddress, totalDeposited, agents] = await Promise.all([
935
935
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "asset" }),
936
936
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "totalDeposited" }),
937
- client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentOperators" })
937
+ client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentAddresses" })
938
938
  ]);
939
939
  [assetDecimals, assetSymbol, assetBalance] = await Promise.all([
940
940
  client.readContract({ address: assetAddress, abi: ERC20_ABI, functionName: "decimals" }),
@@ -1101,7 +1101,7 @@ function registerVeniceCommands(program2) {
1101
1101
  const [assetAddress, totalDeposited, agents] = await Promise.all([
1102
1102
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "asset" }),
1103
1103
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "totalDeposited" }),
1104
- client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentOperators" })
1104
+ client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentAddresses" })
1105
1105
  ]);
1106
1106
  const [assetDecimals, assetSymbol, assetBalance] = await Promise.all([
1107
1107
  client.readContract({ address: assetAddress, abi: ERC20_ABI, functionName: "decimals" }),
@@ -1335,7 +1335,7 @@ function registerAllowanceCommands(program2) {
1335
1335
  [assetAddress, totalDeposited, agents] = await Promise.all([
1336
1336
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "asset" }),
1337
1337
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "totalDeposited" }),
1338
- client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentOperators" })
1338
+ client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentAddresses" })
1339
1339
  ]);
1340
1340
  [assetDecimals, assetSymbol, assetBalance] = await Promise.all([
1341
1341
  client.readContract({ address: assetAddress, abi: ERC20_ABI, functionName: "decimals" }),
@@ -1478,7 +1478,7 @@ function registerAllowanceCommands(program2) {
1478
1478
  const [assetAddress, totalDeposited, agents] = await Promise.all([
1479
1479
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "asset" }),
1480
1480
  client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "totalDeposited" }),
1481
- client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentOperators" })
1481
+ client.readContract({ address: vaultAddress, abi: SYNDICATE_VAULT_ABI, functionName: "getAgentAddresses" })
1482
1482
  ]);
1483
1483
  const [assetDecimals, assetSymbol, assetBalance] = await Promise.all([
1484
1484
  client.readContract({ address: assetAddress, abi: ERC20_ABI, functionName: "decimals" }),
@@ -2502,7 +2502,7 @@ try {
2502
2502
  } catch {
2503
2503
  }
2504
2504
  async function loadXmtp() {
2505
- return import("./xmtp-A6F63GZH.js");
2505
+ return import("./xmtp-S4VRXMFK.js");
2506
2506
  }
2507
2507
  var G3 = chalk7.green;
2508
2508
  var W3 = chalk7.white;
@@ -2660,10 +2660,8 @@ syndicate.command("create").description("Create a new syndicate via the factory
2660
2660
  const creatorAddress = getAccount().address;
2661
2661
  await registerAgent(
2662
2662
  BigInt(agentIdStr),
2663
- creatorAddress,
2664
- // pkp = creator EOA (direct execution)
2665
2663
  creatorAddress
2666
- // operator = creator EOA
2664
+ // agentAddress = creator EOA (direct execution)
2667
2665
  );
2668
2666
  } catch (regErr) {
2669
2667
  console.warn(chalk7.yellow("\n \u26A0 Could not auto-register creator as agent \u2014 register manually with `syndicate add`"));
@@ -2850,7 +2848,7 @@ syndicate.command("remove-depositor").description("Remove an address from the de
2850
2848
  process.exit(1);
2851
2849
  }
2852
2850
  });
2853
- syndicate.command("add").description("Register an agent on a syndicate vault (creator only)").option("--vault <address>", "Vault address (default: from config)").requiredOption("--agent-id <id>", "Agent's ERC-8004 identity token ID").requiredOption("--pkp <address>", "Agent PKP address").requiredOption("--eoa <address>", "Operator EOA address").action(async (opts) => {
2851
+ syndicate.command("add").description("Register an agent on a syndicate vault (creator only)").option("--vault <address>", "Vault address (default: from config)").requiredOption("--agent-id <id>", "Agent's ERC-8004 identity token ID").requiredOption("--wallet <address>", "Agent wallet address").action(async (opts) => {
2854
2852
  const spinner = ora7("Verifying creator...").start();
2855
2853
  try {
2856
2854
  resolveVault(opts);
@@ -2864,8 +2862,7 @@ syndicate.command("add").description("Register an agent on a syndicate vault (cr
2864
2862
  spinner.text = "Registering agent...";
2865
2863
  const hash = await registerAgent(
2866
2864
  BigInt(opts.agentId),
2867
- opts.pkp,
2868
- opts.eoa
2865
+ opts.wallet
2869
2866
  );
2870
2867
  spinner.succeed(`Agent registered: ${hash}`);
2871
2868
  console.log(chalk7.dim(` ${getExplorerUrl(hash)}`));
@@ -2873,10 +2870,10 @@ syndicate.command("add").description("Register an agent on a syndicate vault (cr
2873
2870
  const xmtp = await loadXmtp();
2874
2871
  const xmtpClient = await xmtp.getXmtpClient();
2875
2872
  const group = await xmtp.getGroup(xmtpClient, subdomain);
2876
- await xmtp.addMember(group, opts.pkp);
2873
+ await xmtp.addMember(group, opts.wallet);
2877
2874
  await xmtp.sendEnvelope(group, {
2878
2875
  type: "AGENT_REGISTERED",
2879
- agent: { erc8004Id: Number(opts.agentId), address: opts.pkp },
2876
+ agent: { erc8004Id: Number(opts.agentId), address: opts.wallet },
2880
2877
  syndicate: subdomain,
2881
2878
  timestamp: Math.floor(Date.now() / 1e3)
2882
2879
  });
@@ -3017,7 +3014,7 @@ syndicate.command("requests").description("View pending join requests for a synd
3017
3014
  console.log();
3018
3015
  }
3019
3016
  console.log(G3(" To approve:"));
3020
- console.log(DIM3(` sherwood syndicate approve --agent-id <id> --pkp <addr> --eoa <addr>`));
3017
+ console.log(DIM3(` sherwood syndicate approve --agent-id <id> --wallet <addr>`));
3021
3018
  console.log(G3(" To reject:"));
3022
3019
  console.log(DIM3(` sherwood syndicate reject --attestation <uid>`));
3023
3020
  console.log();
@@ -3027,7 +3024,7 @@ syndicate.command("requests").description("View pending join requests for a synd
3027
3024
  process.exit(1);
3028
3025
  }
3029
3026
  });
3030
- syndicate.command("approve").description("Approve an agent join request (registers agent + creates EAS approval)").option("--vault <address>", "Vault address (default: from config)").option("--subdomain <name>", "Syndicate subdomain (alternative to --vault)").requiredOption("--agent-id <id>", "Agent's ERC-8004 identity token ID").requiredOption("--pkp <address>", "Agent PKP address").requiredOption("--eoa <address>", "Operator EOA address").action(async (opts) => {
3027
+ syndicate.command("approve").description("Approve an agent join request (registers agent + creates EAS approval)").option("--vault <address>", "Vault address (default: from config)").option("--subdomain <name>", "Syndicate subdomain (alternative to --vault)").requiredOption("--agent-id <id>", "Agent's ERC-8004 identity token ID").requiredOption("--wallet <address>", "Agent wallet address").action(async (opts) => {
3031
3028
  const spinner = ora7("Verifying creator...").start();
3032
3029
  try {
3033
3030
  if (opts.subdomain && !opts.vault) {
@@ -3047,8 +3044,7 @@ syndicate.command("approve").description("Approve an agent join request (registe
3047
3044
  try {
3048
3045
  const regHash = await registerAgent(
3049
3046
  BigInt(opts.agentId),
3050
- opts.pkp,
3051
- opts.eoa
3047
+ opts.wallet
3052
3048
  );
3053
3049
  console.log(DIM3(` Agent registered: ${getExplorerUrl(regHash)}`));
3054
3050
  } catch (regErr) {
@@ -3074,7 +3070,7 @@ syndicate.command("approve").description("Approve an agent join request (registe
3074
3070
  syndicateId,
3075
3071
  BigInt(opts.agentId),
3076
3072
  vaultAddress,
3077
- opts.eoa
3073
+ opts.wallet
3078
3074
  );
3079
3075
  approvalUid = result.uid;
3080
3076
  }
@@ -3083,10 +3079,10 @@ syndicate.command("approve").description("Approve an agent join request (registe
3083
3079
  const xmtp = await loadXmtp();
3084
3080
  const xmtpClient = await xmtp.getXmtpClient();
3085
3081
  const group = await xmtp.getGroup(xmtpClient, subdomain);
3086
- await xmtp.addMember(group, opts.pkp);
3082
+ await xmtp.addMember(group, opts.wallet);
3087
3083
  await xmtp.sendEnvelope(group, {
3088
3084
  type: "AGENT_REGISTERED",
3089
- agent: { erc8004Id: Number(opts.agentId), address: opts.pkp },
3085
+ agent: { erc8004Id: Number(opts.agentId), address: opts.wallet },
3090
3086
  syndicate: subdomain,
3091
3087
  timestamp: Math.floor(Date.now() / 1e3)
3092
3088
  });
@@ -3100,8 +3096,7 @@ syndicate.command("approve").description("Approve an agent join request (registe
3100
3096
  console.log(LABEL3(" \u25C6 Agent Approved"));
3101
3097
  SEP3();
3102
3098
  console.log(W3(` Agent ID: #${opts.agentId}`));
3103
- console.log(W3(` PKP: ${G3(opts.pkp)}`));
3104
- console.log(W3(` EOA: ${G3(opts.eoa)}`));
3099
+ console.log(W3(` Wallet: ${G3(opts.wallet)}`));
3105
3100
  console.log(W3(` Approval: ${DIM3(approvalUid)}`));
3106
3101
  console.log(W3(` EAS Scan: ${DIM3(getEasScanUrl(approvalUid))}`));
3107
3102
  SEP3();
@@ -3282,7 +3277,7 @@ ${info.name} (${info.type})`);
3282
3277
  }
3283
3278
  });
3284
3279
  try {
3285
- const { registerChatCommands } = await import("./chat-O34BTHII.js");
3280
+ const { registerChatCommands } = await import("./chat-BNYWD3EL.js");
3286
3281
  registerChatCommands(program);
3287
3282
  } catch {
3288
3283
  program.command("chat <name> [action] [actionArgs...]").description("Syndicate chat (XMTP) \u2014 requires @xmtp/cli").action(() => {
@@ -3292,14 +3287,14 @@ try {
3292
3287
  process.exit(1);
3293
3288
  });
3294
3289
  }
3295
- var { registerSessionCommands } = await import("./session-QEIVURQO.js");
3290
+ var { registerSessionCommands } = await import("./session-QQSHCGNK.js");
3296
3291
  registerSessionCommands(program);
3297
3292
  registerVeniceCommands(program);
3298
3293
  registerAllowanceCommands(program);
3299
3294
  registerIdentityCommands(program);
3300
3295
  registerProposalCommands(program);
3301
3296
  registerGovernorCommands(program);
3302
- var { registerResearchCommands } = await import("./research-GX32VMP7.js");
3297
+ var { registerResearchCommands } = await import("./research-57SKO27M.js");
3303
3298
  registerResearchCommands(program);
3304
3299
  var configCmd = program.command("config");
3305
3300
  configCmd.command("set").description("Save settings to ~/.sherwood/config.json (persists across sessions)").option("--private-key <key>", "Wallet private key (0x-prefixed)").option("--vault <address>", "Default SyndicateVault address").option("--rpc <url>", "Custom RPC URL for the active --chain network").action((opts) => {