@blockrun/cc 0.7.2 → 0.7.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.
@@ -1,8 +1,18 @@
1
1
  import http from 'node:http';
2
2
  import { getOrCreateWallet, getOrCreateSolanaWallet, createPaymentPayload, createSolanaPaymentPayload, parsePaymentRequired, extractPaymentDetails, solanaKeyToBytes, SOLANA_NETWORK, } from '@blockrun/llm';
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import os from 'node:os';
6
+ const LOG_FILE = path.join(os.homedir(), '.blockrun', 'brcc-debug.log');
3
7
  function debug(options, ...args) {
4
- if (options.debug)
5
- console.error('[brcc]', ...args);
8
+ if (!options.debug)
9
+ return;
10
+ const msg = `[${new Date().toISOString()}] ${args.map(String).join(' ')}\n`;
11
+ try {
12
+ fs.mkdirSync(path.dirname(LOG_FILE), { recursive: true });
13
+ fs.appendFileSync(LOG_FILE, msg);
14
+ }
15
+ catch { /* ignore */ }
6
16
  }
7
17
  const DEFAULT_MAX_TOKENS = 4096;
8
18
  let lastOutputTokens = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/cc",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Run Claude Code with any model — no rate limits, no account locks, no phone verification. Pay per use with USDC.",
5
5
  "type": "module",
6
6
  "bin": {