@blockrun/clawrouter 0.8.0 → 0.8.2
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 +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3596,8 +3596,9 @@ function injectModelsConfig(logger) {
|
|
|
3596
3596
|
needsWrite = true;
|
|
3597
3597
|
}
|
|
3598
3598
|
const model = defaults.model;
|
|
3599
|
-
if (model.primary
|
|
3599
|
+
if (!model.primary) {
|
|
3600
3600
|
model.primary = "blockrun/auto";
|
|
3601
|
+
logger.info("Set default model to blockrun/auto (first install)");
|
|
3601
3602
|
needsWrite = true;
|
|
3602
3603
|
}
|
|
3603
3604
|
const KEY_MODEL_ALIASES = [
|
|
@@ -3887,7 +3888,10 @@ var plugin = {
|
|
|
3887
3888
|
if (!agents.defaults) agents.defaults = {};
|
|
3888
3889
|
const defaults = agents.defaults;
|
|
3889
3890
|
if (!defaults.model) defaults.model = {};
|
|
3890
|
-
|
|
3891
|
+
const model = defaults.model;
|
|
3892
|
+
if (!model.primary) {
|
|
3893
|
+
model.primary = "blockrun/auto";
|
|
3894
|
+
}
|
|
3891
3895
|
api.logger.info("BlockRun provider registered (30+ models via x402)");
|
|
3892
3896
|
createWalletCommand().then((walletCommand) => {
|
|
3893
3897
|
api.registerCommand(walletCommand);
|
|
@@ -3921,18 +3925,17 @@ var plugin = {
|
|
|
3921
3925
|
}
|
|
3922
3926
|
}
|
|
3923
3927
|
});
|
|
3924
|
-
|
|
3925
|
-
await startProxyInBackground(api);
|
|
3928
|
+
startProxyInBackground(api).then(async () => {
|
|
3926
3929
|
const port = getProxyPort();
|
|
3927
|
-
const healthy = await waitForProxyHealth(port);
|
|
3930
|
+
const healthy = await waitForProxyHealth(port, 5e3);
|
|
3928
3931
|
if (!healthy) {
|
|
3929
3932
|
api.logger.warn(`Proxy health check timed out, commands may not work immediately`);
|
|
3930
3933
|
}
|
|
3931
|
-
}
|
|
3934
|
+
}).catch((err) => {
|
|
3932
3935
|
api.logger.error(
|
|
3933
3936
|
`Failed to start BlockRun proxy: ${err instanceof Error ? err.message : String(err)}`
|
|
3934
3937
|
);
|
|
3935
|
-
}
|
|
3938
|
+
});
|
|
3936
3939
|
}
|
|
3937
3940
|
};
|
|
3938
3941
|
var index_default = plugin;
|