apow-cli 0.1.2 → 0.1.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/package.json +1 -1
  2. package/skill.md +12 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apow-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Mine AGENT tokens on Base L2 with AI-powered proof of work",
5
5
  "keywords": [
6
6
  "apow",
package/skill.md CHANGED
@@ -53,6 +53,8 @@ npx apow-cli wallet new
53
53
  # Captures address + private key from output (also saved to wallet-<address>.txt)
54
54
 
55
55
  # 2. Write .env directly (no interactive prompts needed)
56
+ # IMPORTANT: Use an API-based provider (openai/anthropic/gemini), NOT claude-code/codex.
57
+ # Session-based providers are too slow for the 20-second mint challenge window.
56
58
  cat > .env << 'EOF'
57
59
  PRIVATE_KEY=0x<from step 1>
58
60
  RPC_URL=https://mainnet.base.org
@@ -237,15 +239,17 @@ CHAIN=base
237
239
 
238
240
  ### LLM Provider Recommendations
239
241
 
242
+ > **For AI agents:** Always use an API-based provider (OpenAI, Anthropic, or Gemini). Session-based providers (`claude-code`, `codex`) spawn a CLI subprocess to solve challenges and are too slow to reliably complete the 20-second mint window. They may work for mining (which has no time limit) but will frequently fail during minting.
243
+
240
244
  | Provider | Model | Cost per call | Notes |
241
245
  |---|---|---|---|
242
- | OpenAI | `gpt-4o-mini` | ~$0.001 | Cheapest cloud option |
243
- | OpenAI | `gpt-4o` | ~$0.005 | Default; good reliability |
246
+ | OpenAI | `gpt-4o-mini` | ~$0.001 | **Recommended for agents.** Cheapest, fastest, reliable |
247
+ | Gemini | `gemini-2.5-flash` | ~$0.001 | Fast, good accuracy |
244
248
  | Anthropic | `claude-sonnet-4-5-20250929` | ~$0.005 | High accuracy on constrained generation |
249
+ | OpenAI | `gpt-4o` | ~$0.005 | Higher quality, slightly slower |
245
250
  | Ollama | `llama3.1` | Free (local) | Requires local GPU; variable accuracy |
246
- | Gemini | `gemini-2.5-flash` | ~$0.001 | Fast, good accuracy |
247
- | Claude Code | `default` | Subscription | Use your existing Claude Code session no API key needed |
248
- | Codex | `default` | Subscription | Use your existing Codex session — no API key needed |
251
+ | Claude Code | `default` | Subscription | **Not recommended for minting** — CLI startup too slow for 20s window |
252
+ | Codex | `default` | Subscription | **Not recommended for minting** CLI startup too slow for 20s window |
249
253
 
250
254
  ### RPC Recommendations
251
255
 
@@ -272,7 +276,7 @@ npx apow-cli mint
272
276
  5. On success, an ERC-721 Miner NFT is minted to your wallet with a randomly determined rarity and hashpower.
273
277
  6. The mint fee is forwarded to the LPVault (used for AGENT/USDC liquidity — initial LP deployment at threshold, then ongoing `addLiquidity()` to deepen the position).
274
278
 
275
- **Challenge expiry:** 20 seconds from `getChallenge` to `mint`. The LLM must solve quickly.
279
+ **Challenge expiry:** 20 seconds from `getChallenge` to `mint`. The LLM must solve quickly. Use an API-based provider (openai/anthropic/gemini) — session-based providers (claude-code/codex) are too slow and will fail.
276
280
 
277
281
  ### Mint Price
278
282
 
@@ -479,7 +483,7 @@ LLM_PROVIDER=codex
479
483
  - The CLI must be available in your PATH
480
484
  - Your subscription must be active
481
485
 
482
- **Trade-off:** Session-based solving may be slightly slower than direct API calls due to CLI startup overhead, but eliminates the need for separate API keys and billing. The 15-second timeout ensures challenges are still submitted within the contract's 20-second window.
486
+ **Warning:** Session-based providers (`claude-code`, `codex`) spawn a CLI subprocess for each SMHL challenge. The startup overhead frequently exceeds the 20-second mint challenge window, causing mints to fail with `Expired`. **For minting, always use an API-based provider** (openai, anthropic, or gemini). Session providers may work for the mining loop (which has no time limit per challenge) but are unreliable and not recommended for autonomous operation.
483
487
 
484
488
  ### Custom RPC Endpoints
485
489
 
@@ -522,7 +526,7 @@ Use the corresponding testnet contract addresses.
522
526
  | `LLM_API_KEY is required for openai.` | Missing API key for cloud provider | Set `LLM_API_KEY` (or provider-specific key like `OPENAI_API_KEY`) in `.env`, or switch to `ollama` |
523
527
  | `Insufficient fee` | Not enough ETH sent with mint | Check `getMintPrice()` and ensure wallet has enough ETH |
524
528
  | `Sold out` | All 10,000 Miner NFTs minted | No more rigs available; buy one on secondary market |
525
- | `Expired` | SMHL challenge expired (>20s) | Your LLM is too slow; use a faster model or provider |
529
+ | `Expired` | SMHL challenge expired (>20s) | Switch to an API-based provider (openai/gemini/anthropic). Session providers (claude-code/codex) are too slow for the 20s mint window |
526
530
  | `Invalid SMHL` | LLM produced an incorrect solution | Retry; if persistent, switch to a more capable model |
527
531
  | `Not your miner` | Token ID not owned by your wallet | Verify `PRIVATE_KEY` matches the NFT owner; check token ID |
528
532
  | `Supply exhausted` | All 18.9M mineable AGENT has been minted | Mining is complete; no more rewards available |