@blockrun/clawrouter 0.12.130 → 0.12.131

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 CHANGED
@@ -80053,6 +80053,83 @@ function createStatsCommand() {
80053
80053
  };
80054
80054
  }
80055
80055
 
80056
+ // src/commands/exclude.ts
80057
+ function createExcludeCommand() {
80058
+ return {
80059
+ name: "exclude",
80060
+ description: "Manage excluded models \u2014 /exclude add|remove|clear <model>",
80061
+ acceptsArgs: true,
80062
+ requireAuth: true,
80063
+ handler: async (ctx) => {
80064
+ const args = ctx.args?.trim() || "";
80065
+ const parts = args.split(/\s+/);
80066
+ const subcommand = parts[0]?.toLowerCase() || "";
80067
+ const modelArg = parts.slice(1).join(" ").trim();
80068
+ if (!subcommand) {
80069
+ const list = loadExcludeList();
80070
+ if (list.size === 0) {
80071
+ return {
80072
+ text: "No models excluded.\n\nUsage:\n /exclude add <model> \u2014 block a model\n /exclude remove <model> \u2014 unblock\n /exclude clear \u2014 remove all"
80073
+ };
80074
+ }
80075
+ const models = [...list].sort().map((m) => ` \u2022 ${m}`).join("\n");
80076
+ return {
80077
+ text: `Excluded models (${list.size}):
80078
+ ${models}
80079
+
80080
+ Use /exclude remove <model> to unblock.`
80081
+ };
80082
+ }
80083
+ if (subcommand === "add") {
80084
+ if (!modelArg) {
80085
+ return {
80086
+ text: "Usage: /exclude add <model>\nExample: /exclude add nvidia/gpt-oss-120b",
80087
+ isError: true
80088
+ };
80089
+ }
80090
+ const resolved = addExclusion(modelArg);
80091
+ const list = loadExcludeList();
80092
+ return {
80093
+ text: `Excluded: ${resolved}
80094
+
80095
+ Active exclusions (${list.size}):
80096
+ ${[...list].sort().map((m) => ` \u2022 ${m}`).join("\n")}`
80097
+ };
80098
+ }
80099
+ if (subcommand === "remove") {
80100
+ if (!modelArg) {
80101
+ return { text: "Usage: /exclude remove <model>", isError: true };
80102
+ }
80103
+ const removed = removeExclusion(modelArg);
80104
+ if (!removed) {
80105
+ return { text: `Model "${modelArg}" was not in the exclude list.` };
80106
+ }
80107
+ const list = loadExcludeList();
80108
+ return {
80109
+ text: `Unblocked: ${modelArg}
80110
+
80111
+ Active exclusions (${list.size}):
80112
+ ${list.size > 0 ? [...list].sort().map((m) => ` \u2022 ${m}`).join("\n") : " (none)"}`
80113
+ };
80114
+ }
80115
+ if (subcommand === "clear") {
80116
+ clearExclusions();
80117
+ return { text: "All model exclusions cleared." };
80118
+ }
80119
+ return {
80120
+ text: `Unknown subcommand: ${subcommand}
80121
+
80122
+ Usage:
80123
+ /exclude \u2014 show list
80124
+ /exclude add <model>
80125
+ /exclude remove <model>
80126
+ /exclude clear`,
80127
+ isError: true
80128
+ };
80129
+ }
80130
+ };
80131
+ }
80132
+
80056
80133
  // src/index.ts
80057
80134
  init_solana_balance();
80058
80135
 
@@ -80785,81 +80862,6 @@ async function startProxyInBackground(api) {
80785
80862
  api.logger.info(`Wallet (${network}): ${displayAddress} | Balance: (checking...)`);
80786
80863
  });
80787
80864
  }
80788
- function createExcludeCommand() {
80789
- return {
80790
- name: "exclude",
80791
- description: "Manage excluded models \u2014 /exclude add|remove|clear <model>",
80792
- acceptsArgs: true,
80793
- requireAuth: true,
80794
- handler: async (ctx) => {
80795
- const args = ctx.args?.trim() || "";
80796
- const parts = args.split(/\s+/);
80797
- const subcommand = parts[0]?.toLowerCase() || "";
80798
- const modelArg = parts.slice(1).join(" ").trim();
80799
- if (!subcommand) {
80800
- const list = loadExcludeList();
80801
- if (list.size === 0) {
80802
- return {
80803
- text: "No models excluded.\n\nUsage:\n /exclude add <model> \u2014 block a model\n /exclude remove <model> \u2014 unblock\n /exclude clear \u2014 remove all"
80804
- };
80805
- }
80806
- const models = [...list].sort().map((m) => ` \u2022 ${m}`).join("\n");
80807
- return {
80808
- text: `Excluded models (${list.size}):
80809
- ${models}
80810
-
80811
- Use /exclude remove <model> to unblock.`
80812
- };
80813
- }
80814
- if (subcommand === "add") {
80815
- if (!modelArg) {
80816
- return {
80817
- text: "Usage: /exclude add <model>\nExample: /exclude add nvidia/gpt-oss-120b",
80818
- isError: true
80819
- };
80820
- }
80821
- const resolved = addExclusion(modelArg);
80822
- const list = loadExcludeList();
80823
- return {
80824
- text: `Excluded: ${resolved}
80825
-
80826
- Active exclusions (${list.size}):
80827
- ${[...list].sort().map((m) => ` \u2022 ${m}`).join("\n")}`
80828
- };
80829
- }
80830
- if (subcommand === "remove") {
80831
- if (!modelArg) {
80832
- return { text: "Usage: /exclude remove <model>", isError: true };
80833
- }
80834
- const removed = removeExclusion(modelArg);
80835
- if (!removed) {
80836
- return { text: `Model "${modelArg}" was not in the exclude list.` };
80837
- }
80838
- const list = loadExcludeList();
80839
- return {
80840
- text: `Unblocked: ${modelArg}
80841
-
80842
- Active exclusions (${list.size}):
80843
- ${list.size > 0 ? [...list].sort().map((m) => ` \u2022 ${m}`).join("\n") : " (none)"}`
80844
- };
80845
- }
80846
- if (subcommand === "clear") {
80847
- clearExclusions();
80848
- return { text: "All model exclusions cleared." };
80849
- }
80850
- return {
80851
- text: `Unknown subcommand: ${subcommand}
80852
-
80853
- Usage:
80854
- /exclude \u2014 show list
80855
- /exclude add <model>
80856
- /exclude remove <model>
80857
- /exclude clear`,
80858
- isError: true
80859
- };
80860
- }
80861
- };
80862
- }
80863
80865
  var IMAGE_DIR2 = join10(homedir7(), ".openclaw", "blockrun", "images");
80864
80866
  var AUDIO_DIR2 = join10(homedir7(), ".openclaw", "blockrun", "audio");
80865
80867
  function buildImageGenerationProvider() {