@astranova-live/cli 0.2.1 → 0.2.3

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 (2) hide show
  1. package/dist/astra.js +13 -3
  2. package/package.json +1 -1
package/dist/astra.js CHANGED
@@ -2378,6 +2378,11 @@ You have access to detailed guides loaded at startup. When the user asks specifi
2378
2378
  - Tell the user how long to wait. Different endpoints have different limits.
2379
2379
  - Trades: max 10 per epoch (~30 min). Market reads: 60/min. General: 100/min.
2380
2380
 
2381
+ **Market warm-up (MARKET_UNAVAILABLE / EPOCH_UNAVAILABLE):**
2382
+ - If any API call returns code "MARKET_UNAVAILABLE" or "EPOCH_UNAVAILABLE", the world engine is initializing. This happens for a few minutes at the start of a new season or after a restart.
2383
+ - Tell the user: "The market is warming up right now \u2014 this happens briefly at the start of a new season. Try again in a few minutes."
2384
+ - Do NOT offer to retry automatically. Do NOT retry in a loop. Just let the user know and wait for them to try again.
2385
+
2381
2386
  **Not yet available in CLI:**
2382
2387
  - PATCH /api/v1/agents/me (description update) \u2014 not implemented yet
2383
2388
  - POST /api/v1/agents/me/rotate-key (key rotation) \u2014 not implemented yet
@@ -2668,12 +2673,11 @@ import { tool as tool4 } from "ai";
2668
2673
  import {
2669
2674
  Keypair,
2670
2675
  Connection,
2671
- VersionedTransaction,
2672
- clusterApiUrl
2676
+ VersionedTransaction
2673
2677
  } from "@solana/web3.js";
2674
2678
  import nacl from "tweetnacl";
2675
2679
  import bs58 from "bs58";
2676
- var SOLANA_RPC = clusterApiUrl("devnet");
2680
+ var SOLANA_RPC = "https://api.mainnet-beta.solana.com";
2677
2681
  var createWalletTool = tool4({
2678
2682
  description: "Generate a new Solana wallet keypair. Saves the keypair locally and returns the public key. The secret key is stored securely and never exposed.",
2679
2683
  parameters: createWalletSchema,
@@ -2780,6 +2784,12 @@ var signAndSendTransactionTool = tool4({
2780
2784
  };
2781
2785
  } catch (error) {
2782
2786
  const message = error instanceof Error ? error.message : "Unknown error";
2787
+ const isInsufficientFunds = message.includes("Insufficient funds") || message.includes("insufficient lamports") || message.includes("no record of a prior credit");
2788
+ if (isInsufficientFunds) {
2789
+ return {
2790
+ error: `Wallet has no SOL for transaction fees. Send at least 0.002 SOL to ${wallet.publicKey} (first claim creates a token account \u2014 after that fees are ~0.000005 SOL). Once funded, try claiming again.`
2791
+ };
2792
+ }
2783
2793
  return { error: `Transaction failed: ${message}` };
2784
2794
  }
2785
2795
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astranova-live/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Terminal agent for the AstraNova living market universe",
5
5
  "type": "module",
6
6
  "bin": {