@sherwoodagent/cli 0.58.6 → 0.59.4

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.
Files changed (36) hide show
  1. package/dist/{addresses-4UI26LWU.js → addresses-YADHNQJF.js} +2 -2
  2. package/dist/{chat-SQCWYIKG.js → chat-YSSQRBDJ.js} +72 -6
  3. package/dist/chat-YSSQRBDJ.js.map +1 -0
  4. package/dist/{chunk-V5DYFQCQ.js → chunk-3LKVNG6G.js} +2 -2
  5. package/dist/{chunk-TPDRDOCF.js → chunk-JAJCRYNH.js} +2 -2
  6. package/dist/{chunk-ZORVNIGX.js → chunk-OH4U2VBU.js} +2 -2
  7. package/dist/{chunk-XFVLEE5S.js → chunk-P7AUSI6R.js} +2 -2
  8. package/dist/{chunk-3UETTXXU.js → chunk-RZQ5BF2U.js} +19 -13
  9. package/dist/chunk-RZQ5BF2U.js.map +1 -0
  10. package/dist/{chunk-3OAGUA2S.js → chunk-XXGZB6S3.js} +2 -2
  11. package/dist/{eas-OEBIB5RW.js → eas-NEAAOTP3.js} +3 -3
  12. package/dist/{governor-UWI3QYHV.js → governor-PX5GCCCT.js} +3 -3
  13. package/dist/index.js +31 -21
  14. package/dist/index.js.map +1 -1
  15. package/dist/{price-MUILXUC4.js → price-PPOVTQL4.js} +2 -2
  16. package/dist/{research-AR4TABCF.js → research-P6AJVTVE.js} +3 -3
  17. package/dist/{session-ISY5VAUS.js → session-B77JKCGZ.js} +5 -5
  18. package/dist/{trade-VTRYXGP4.js → trade-WB2LKYKT.js} +6 -6
  19. package/dist/{xmtp-IVDHDORA.js → xmtp-HC774TEI.js} +39 -7
  20. package/dist/xmtp-HC774TEI.js.map +1 -0
  21. package/package.json +1 -1
  22. package/dist/chat-SQCWYIKG.js.map +0 -1
  23. package/dist/chunk-3UETTXXU.js.map +0 -1
  24. package/dist/xmtp-IVDHDORA.js.map +0 -1
  25. /package/dist/{addresses-4UI26LWU.js.map → addresses-YADHNQJF.js.map} +0 -0
  26. /package/dist/{chunk-V5DYFQCQ.js.map → chunk-3LKVNG6G.js.map} +0 -0
  27. /package/dist/{chunk-TPDRDOCF.js.map → chunk-JAJCRYNH.js.map} +0 -0
  28. /package/dist/{chunk-ZORVNIGX.js.map → chunk-OH4U2VBU.js.map} +0 -0
  29. /package/dist/{chunk-XFVLEE5S.js.map → chunk-P7AUSI6R.js.map} +0 -0
  30. /package/dist/{chunk-3OAGUA2S.js.map → chunk-XXGZB6S3.js.map} +0 -0
  31. /package/dist/{eas-OEBIB5RW.js.map → eas-NEAAOTP3.js.map} +0 -0
  32. /package/dist/{governor-UWI3QYHV.js.map → governor-PX5GCCCT.js.map} +0 -0
  33. /package/dist/{price-MUILXUC4.js.map → price-PPOVTQL4.js.map} +0 -0
  34. /package/dist/{research-AR4TABCF.js.map → research-P6AJVTVE.js.map} +0 -0
  35. /package/dist/{session-ISY5VAUS.js.map → session-B77JKCGZ.js.map} +0 -0
  36. /package/dist/{trade-VTRYXGP4.js.map → trade-WB2LKYKT.js.map} +0 -0
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  encodeSwapPath,
16
16
  getMultiHopQuote,
17
17
  getQuote
18
- } from "./chunk-XFVLEE5S.js";
18
+ } from "./chunk-P7AUSI6R.js";
19
19
  import {
20
20
  chatCompletion,
21
21
  checkApiKeyValid,
@@ -32,14 +32,14 @@ import {
32
32
  queryJoinRequests,
33
33
  revokeJoinRequest,
34
34
  stripReferrerPrefix
35
- } from "./chunk-3OAGUA2S.js";
35
+ } from "./chunk-XXGZB6S3.js";
36
36
  import {
37
37
  createSyndicate,
38
38
  getActiveSyndicates,
39
39
  getSyndicate,
40
40
  subdomainExists,
41
41
  updateMetadata
42
- } from "./chunk-TPDRDOCF.js";
42
+ } from "./chunk-JAJCRYNH.js";
43
43
  import {
44
44
  approveDepositor,
45
45
  deposit,
@@ -63,7 +63,7 @@ import {
63
63
  searchSyndicateAcrossChains,
64
64
  setTextRecord,
65
65
  setVaultAddress
66
- } from "./chunk-V5DYFQCQ.js";
66
+ } from "./chunk-3LKVNG6G.js";
67
67
  import {
68
68
  PROPOSAL_STATE,
69
69
  PROPOSAL_STATES,
@@ -95,7 +95,7 @@ import {
95
95
  setVotingPeriod,
96
96
  settleProposal,
97
97
  vote
98
- } from "./chunk-ZORVNIGX.js";
98
+ } from "./chunk-OH4U2VBU.js";
99
99
  import {
100
100
  AERODROME,
101
101
  AGENT_REGISTRY,
@@ -107,7 +107,7 @@ import {
107
107
  TOKENS,
108
108
  UNISWAP,
109
109
  VENICE
110
- } from "./chunk-3UETTXXU.js";
110
+ } from "./chunk-RZQ5BF2U.js";
111
111
  import {
112
112
  formatContractError,
113
113
  getAccount,
@@ -464,6 +464,7 @@ var INIT_PARAMS_TYPES3 = [
464
464
  { name: "mwsteth", type: "address" },
465
465
  { name: "aeroRouter", type: "address" },
466
466
  { name: "aeroFactory", type: "address" },
467
+ { name: "chainlinkWstethEthFeed", type: "address" },
467
468
  { name: "supplyAmount", type: "uint256" },
468
469
  { name: "minWstethOutPerWeth", type: "uint256" },
469
470
  { name: "minWethOutPerWsteth", type: "uint256" },
@@ -570,6 +571,7 @@ function buildInitData6(asset, swapAdapter, chainlinkVerifier, allocations, tota
570
571
  const tokens = allocations.map((a) => a.token);
571
572
  const weightsBps = allocations.map((a) => BigInt(a.weightBps));
572
573
  const swapExtraData = allocations.map((a) => a.swapExtraData);
574
+ const priceDecimals = allocations.map((a) => a.priceDecimals);
573
575
  return encodeAbiParameters6(
574
576
  [
575
577
  { type: "address" },
@@ -579,7 +581,8 @@ function buildInitData6(asset, swapAdapter, chainlinkVerifier, allocations, tota
579
581
  { type: "uint256[]" },
580
582
  { type: "uint256" },
581
583
  { type: "uint256" },
582
- { type: "bytes[]" }
584
+ { type: "bytes[]" },
585
+ { type: "uint8[]" }
583
586
  ],
584
587
  [
585
588
  asset,
@@ -589,7 +592,8 @@ function buildInitData6(asset, swapAdapter, chainlinkVerifier, allocations, tota
589
592
  weightsBps,
590
593
  totalAmount,
591
594
  BigInt(maxSlippageBps),
592
- swapExtraData
595
+ swapExtraData,
596
+ priceDecimals
593
597
  ]
594
598
  );
595
599
  }
@@ -1073,6 +1077,7 @@ async function buildInitDataForTemplate(templateKey, opts, vault) {
1073
1077
  mwsteth: MOONWELL().mWstETH,
1074
1078
  aeroRouter: AERODROME().ROUTER,
1075
1079
  aeroFactory: AERODROME().FACTORY,
1080
+ chainlinkWstethEthFeed: CHAINLINK().WSTETH_ETH_FEED,
1076
1081
  supplyAmount,
1077
1082
  minWstethOutPerWeth,
1078
1083
  minWethOutPerWsteth,
@@ -1156,7 +1161,12 @@ async function buildInitDataForTemplate(templateKey, opts, vault) {
1156
1161
  allocations.push({
1157
1162
  token,
1158
1163
  weightBps: weightsBps[i],
1159
- swapExtraData: route.extraData
1164
+ swapExtraData: route.extraData,
1165
+ // Default Chainlink Data Streams report decimals: 18 for crypto pairs,
1166
+ // 8 for tokenized stocks. Tokenized-stock baskets should override
1167
+ // explicitly via the CLI flag once exposed; 18 keeps current crypto
1168
+ // baskets (TSLA/AMZN/NFLX on Robinhood Chain are 18-dec) correct.
1169
+ priceDecimals: 18
1160
1170
  });
1161
1171
  }
1162
1172
  return {
@@ -1621,9 +1631,9 @@ function registerStrategyTemplateCommands(strategy2) {
1621
1631
  console.error(chalk.red("Missing --name, --performance-fee, or --duration. Use --write-calls to skip proposal submission."));
1622
1632
  process.exit(1);
1623
1633
  }
1624
- const { propose: propose2 } = await import("./governor-UWI3QYHV.js");
1634
+ const { propose: propose2 } = await import("./governor-PX5GCCCT.js");
1625
1635
  const { pinJSON } = await import("./ipfs-IGXLLJCF.js");
1626
- const { parseDuration: parseDuration2 } = await import("./governor-UWI3QYHV.js");
1636
+ const { parseDuration: parseDuration2 } = await import("./governor-PX5GCCCT.js");
1627
1637
  const performanceFeeBps = BigInt(opts.performanceFee);
1628
1638
  if (performanceFeeBps < 0n || performanceFeeBps > 10000n) {
1629
1639
  console.error(chalk.red("--performance-fee must be 0-10000 (basis points)"));
@@ -1731,7 +1741,7 @@ function registerStrategyTemplateCommands(strategy2) {
1731
1741
  let prices = [];
1732
1742
  let priceSource = null;
1733
1743
  try {
1734
- const { getTokenPricesInAsset } = await import("./price-MUILXUC4.js");
1744
+ const { getTokenPricesInAsset } = await import("./price-PPOVTQL4.js");
1735
1745
  prices = await getTokenPricesInAsset({
1736
1746
  tokens: allocations.map((a, i) => ({
1737
1747
  token: a.token,
@@ -2161,7 +2171,7 @@ function registerVeniceCommands(program2) {
2161
2171
  console.log(chalk2.dim(` Key: ${apiKey.slice(0, 8)}...${apiKey.slice(-4)}`));
2162
2172
  console.log(chalk2.dim(" Saved to ~/.sherwood/config.json"));
2163
2173
  try {
2164
- const { createVeniceProvisionAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-OEBIB5RW.js");
2174
+ const { createVeniceProvisionAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-NEAAOTP3.js");
2165
2175
  const { uid } = await createVeniceProvisionAttestation(account.address);
2166
2176
  if (uid !== "0x0000000000000000000000000000000000000000000000000000000000000000") {
2167
2177
  console.log(chalk2.dim(` Attested: ${getEasScanUrl2(uid)}`));
@@ -2517,7 +2527,7 @@ ${opts.prompt}`;
2517
2527
  console.log(chalk2.dim(`Model: ${result.model} | Tokens: ${result.usage.promptTokens} in, ${result.usage.completionTokens} out, ${result.usage.totalTokens} total`));
2518
2528
  }
2519
2529
  try {
2520
- const { createVeniceInferenceAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-OEBIB5RW.js");
2530
+ const { createVeniceInferenceAttestation, getEasScanUrl: getEasScanUrl2 } = await import("./eas-NEAAOTP3.js");
2521
2531
  const { keccak256: keccak2562, toHex, isAddress: isAddr } = await import("viem");
2522
2532
  const { getChainContracts: getChainContracts2 } = await import("./config-REASKDIK.js");
2523
2533
  const { getChain: getActiveChain } = await import("./network-3ZU7UBDU.js");
@@ -3732,7 +3742,7 @@ function printSimulationResult(result, callType) {
3732
3742
  }
3733
3743
  async function sendSimulationAlert(subdomain, proposalId, vault, execResult, settleResult) {
3734
3744
  try {
3735
- const xmtp = await import("./xmtp-IVDHDORA.js");
3745
+ const xmtp = await import("./xmtp-HC774TEI.js");
3736
3746
  const { getAccount: getAccount2 } = await import("./client-UHHCB6EZ.js");
3737
3747
  const group = await xmtp.getGroup("", subdomain);
3738
3748
  const allRisks = [...execResult.risks, ...settleResult?.risks ?? []];
@@ -7184,7 +7194,7 @@ try {
7184
7194
  var require2 = createRequire(import.meta.url);
7185
7195
  var { version: CLI_VERSION } = require2("../package.json");
7186
7196
  async function loadXmtp() {
7187
- return import("./xmtp-IVDHDORA.js");
7197
+ return import("./xmtp-HC774TEI.js");
7188
7198
  }
7189
7199
  async function loadCron() {
7190
7200
  return import("./cron-EOULYO3R.js");
@@ -7709,7 +7719,7 @@ syndicate.command("add").description("Register an agent on a syndicate vault (cr
7709
7719
  if (opts.agentId) {
7710
7720
  agentId = BigInt(opts.agentId);
7711
7721
  } else {
7712
- const { AGENT_REGISTRY: AGENT_REGISTRY2 } = await import("./addresses-4UI26LWU.js");
7722
+ const { AGENT_REGISTRY: AGENT_REGISTRY2 } = await import("./addresses-YADHNQJF.js");
7713
7723
  const registry2 = AGENT_REGISTRY2().IDENTITY_REGISTRY;
7714
7724
  if (registry2 === "0x0000000000000000000000000000000000000000") {
7715
7725
  agentId = 0n;
@@ -8334,7 +8344,7 @@ ${info.name} (${info.type})`);
8334
8344
  }
8335
8345
  });
8336
8346
  try {
8337
- const { registerChatCommands } = await import("./chat-SQCWYIKG.js");
8347
+ const { registerChatCommands } = await import("./chat-YSSQRBDJ.js");
8338
8348
  registerChatCommands(program);
8339
8349
  } catch {
8340
8350
  program.command("chat <name> [action] [actionArgs...]").description("Syndicate chat (XMTP) \u2014 requires @xmtp/cli").action(() => {
@@ -8344,7 +8354,7 @@ try {
8344
8354
  process.exit(1);
8345
8355
  });
8346
8356
  }
8347
- var { registerSessionCommands } = await import("./session-ISY5VAUS.js");
8357
+ var { registerSessionCommands } = await import("./session-B77JKCGZ.js");
8348
8358
  registerSessionCommands(program);
8349
8359
  registerVeniceCommands(program);
8350
8360
  registerAllowanceCommands(program);
@@ -8352,11 +8362,11 @@ registerIdentityCommands(program);
8352
8362
  registerProposalCommands(program);
8353
8363
  registerGovernorCommands(program);
8354
8364
  registerGuardianCommands(program);
8355
- var { registerResearchCommands } = await import("./research-AR4TABCF.js");
8365
+ var { registerResearchCommands } = await import("./research-P6AJVTVE.js");
8356
8366
  registerResearchCommands(program);
8357
8367
  var { registerAgentCommands } = await import("./agent-GKHZEPOT.js");
8358
8368
  registerAgentCommands(program);
8359
- var { registerTradeCommands } = await import("./trade-VTRYXGP4.js");
8369
+ var { registerTradeCommands } = await import("./trade-WB2LKYKT.js");
8360
8370
  registerTradeCommands(program);
8361
8371
  registerGridCommand(program);
8362
8372
  var configCmd = program.command("config");