@blockrun/clawrouter 0.9.35 → 0.9.37
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/index.js +13 -22
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -5768,15 +5768,6 @@ var plugin = {
|
|
|
5768
5768
|
apiKey: "x402-proxy-handles-auth",
|
|
5769
5769
|
models: OPENCLAW_MODELS
|
|
5770
5770
|
};
|
|
5771
|
-
if (!api.config.agents) api.config.agents = {};
|
|
5772
|
-
const agents = api.config.agents;
|
|
5773
|
-
if (!agents.defaults) agents.defaults = {};
|
|
5774
|
-
const defaults = agents.defaults;
|
|
5775
|
-
if (!defaults.model) defaults.model = {};
|
|
5776
|
-
const model = defaults.model;
|
|
5777
|
-
if (!model.primary) {
|
|
5778
|
-
model.primary = "blockrun/auto";
|
|
5779
|
-
}
|
|
5780
5771
|
api.logger.info("BlockRun provider registered (30+ models via x402)");
|
|
5781
5772
|
createWalletCommand().then((walletCommand) => {
|
|
5782
5773
|
api.registerCommand(walletCommand);
|
|
@@ -5810,20 +5801,20 @@ var plugin = {
|
|
|
5810
5801
|
}
|
|
5811
5802
|
}
|
|
5812
5803
|
});
|
|
5813
|
-
resolveOrGenerateWalletKey().then(({ address, source }) => {
|
|
5814
|
-
if (source === "generated") {
|
|
5815
|
-
api.logger.info(`Generated new wallet: ${address}`);
|
|
5816
|
-
} else if (source === "saved") {
|
|
5817
|
-
api.logger.info(`Using saved wallet: ${address}`);
|
|
5818
|
-
} else {
|
|
5819
|
-
api.logger.info(`Using wallet from BLOCKRUN_WALLET_KEY: ${address}`);
|
|
5820
|
-
}
|
|
5821
|
-
}).catch((err) => {
|
|
5822
|
-
api.logger.warn(
|
|
5823
|
-
`Failed to initialize wallet: ${err instanceof Error ? err.message : String(err)}`
|
|
5824
|
-
);
|
|
5825
|
-
});
|
|
5826
5804
|
if (!isGatewayMode()) {
|
|
5805
|
+
resolveOrGenerateWalletKey().then(({ address, source }) => {
|
|
5806
|
+
if (source === "generated") {
|
|
5807
|
+
api.logger.info(`Generated new wallet: ${address}`);
|
|
5808
|
+
} else if (source === "saved") {
|
|
5809
|
+
api.logger.info(`Using saved wallet: ${address}`);
|
|
5810
|
+
} else {
|
|
5811
|
+
api.logger.info(`Using wallet from BLOCKRUN_WALLET_KEY: ${address}`);
|
|
5812
|
+
}
|
|
5813
|
+
}).catch((err) => {
|
|
5814
|
+
api.logger.warn(
|
|
5815
|
+
`Failed to initialize wallet: ${err instanceof Error ? err.message : String(err)}`
|
|
5816
|
+
);
|
|
5817
|
+
});
|
|
5827
5818
|
api.logger.info("Not in gateway mode \u2014 proxy will start when gateway runs");
|
|
5828
5819
|
return;
|
|
5829
5820
|
}
|