apow-cli 0.11.15 → 0.11.17
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/clawrouter.js +5 -34
- package/dist/config.js +1 -1
- package/dist/grinder-http.js +1 -1
- package/package.json +1 -1
package/dist/clawrouter.js
CHANGED
|
@@ -5,39 +5,6 @@
|
|
|
5
5
|
* Manages an in-process ClawRouter proxy that routes LLM calls through x402,
|
|
6
6
|
* paying for inference with USDC from the agent's existing wallet.
|
|
7
7
|
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
-
}) : function(o, v) {
|
|
22
|
-
o["default"] = v;
|
|
23
|
-
});
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
9
|
exports.isClawRouterRunning = isClawRouterRunning;
|
|
43
10
|
exports.getClawRouterBaseUrl = getClawRouterBaseUrl;
|
|
@@ -45,6 +12,10 @@ exports.ensureClawRouter = ensureClawRouter;
|
|
|
45
12
|
exports.stopClawRouter = stopClawRouter;
|
|
46
13
|
let _handle = null;
|
|
47
14
|
let _starting = null;
|
|
15
|
+
function importEsmModule(specifier) {
|
|
16
|
+
// Keep a real runtime import() so CommonJS builds can load ESM-only packages.
|
|
17
|
+
return Function("specifier", "return import(specifier)")(specifier);
|
|
18
|
+
}
|
|
48
19
|
function getPort() {
|
|
49
20
|
const envPort = process.env.CLAWROUTER_PORT;
|
|
50
21
|
if (envPort) {
|
|
@@ -71,7 +42,7 @@ async function ensureClawRouter(privateKey) {
|
|
|
71
42
|
return;
|
|
72
43
|
}
|
|
73
44
|
_starting = (async () => {
|
|
74
|
-
const { startProxy } = await
|
|
45
|
+
const { startProxy } = await importEsmModule("@blockrun/clawrouter");
|
|
75
46
|
const port = getPort();
|
|
76
47
|
const handle = await startProxy({
|
|
77
48
|
wallet: privateKey,
|
package/dist/config.js
CHANGED
|
@@ -92,7 +92,7 @@ function resolveStaleCheckIntervalMs() {
|
|
|
92
92
|
if (process.env.STALE_CHECK_INTERVAL) {
|
|
93
93
|
return parseInt(process.env.STALE_CHECK_INTERVAL, 10) * 1000;
|
|
94
94
|
}
|
|
95
|
-
return
|
|
95
|
+
return 60_000;
|
|
96
96
|
}
|
|
97
97
|
function buildConfig() {
|
|
98
98
|
const chainName = resolveChainName();
|
package/dist/grinder-http.js
CHANGED
|
@@ -50,7 +50,7 @@ exports.getGrindUrl = getGrindUrl;
|
|
|
50
50
|
exports.grindNonceHttp = grindNonceHttp;
|
|
51
51
|
const config_1 = require("./config");
|
|
52
52
|
const DEFAULT_GRIND_URL = "https://grind.apow.io/grind";
|
|
53
|
-
const GRIND_HTTP_TIMEOUT_MS =
|
|
53
|
+
const GRIND_HTTP_TIMEOUT_MS = 60_000;
|
|
54
54
|
// Lazy singleton — created on first grind, reused across calls
|
|
55
55
|
let _fetchWithPayment = null;
|
|
56
56
|
function resetPaymentFetch() {
|