@rse/claudex 1.0.8 → 1.0.9

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
  ChangeLog
3
3
  =========
4
4
 
5
+ 1.0.9 (2026-06-15)
6
+ ------------------
7
+
8
+ - FEATURE: add support for OpenRouter-based LLM usage via `openrouter:` `CLAUDE_MODEL`
9
+ - IMPROVEMENT: support text selection in `tmux` fullscreen mode via `ansi-recolor.conf`
10
+
5
11
  1.0.8 (2026-05-29)
6
12
  ------------------
7
13
 
package/ansi-recolor.conf CHANGED
@@ -119,6 +119,8 @@ claude:
119
119
 
120
120
  */31 -> rse-white/rse-blue-1
121
121
 
122
+ */189 -> */rse-blue-4
123
+
122
124
  magenta/* -> red/*
123
125
  yellow/* -> red/*
124
126
  cyan/* -> blue/*
package/claudex.js CHANGED
@@ -898,15 +898,52 @@ const actionDefault = (opts, args) => {
898
898
  env.ANTHROPIC_DEFAULT_HAIKU_MODEL = model;
899
899
  env.ANTHROPIC_DEFAULT_OPUS_MODEL = model;
900
900
  env.ANTHROPIC_DEFAULT_SONNET_MODEL = model;
901
+ env.CLAUDE_CODE_SUBAGENT_MODEL = model;
901
902
  env.CLAUDE_CODE_ATTRIBUTION_HEADER = "0";
902
903
  env.CLAUDE_CODE_AUTO_COMPACT_WINDOW = context;
904
+ env.DISABLE_LOGIN_COMMAND = "1";
905
+ env.DISABLE_LOGOUT_COMMAND = "1";
906
+ }
907
+ else if (/^openrouter:/.test(claudeModel)) {
908
+ /* parse openrouter:<model>[?[context=<size>],[capabilities=<list>]] */
909
+ const remainder = claudeModel.slice("openrouter:".length);
910
+ const qIdx = remainder.indexOf("?");
911
+ const model = qIdx >= 0 ? remainder.slice(0, qIdx) : remainder;
912
+ if (model === "")
913
+ fatal("invalid CLAUDE_MODEL: missing model name in " +
914
+ `"${claudeModel}" (expected: openrouter:<model>[?...])`);
915
+ let context = "200k";
916
+ let capabilities = "";
917
+ if (qIdx >= 0) {
918
+ const query = remainder.slice(qIdx + 1);
919
+ for (const pair of query.split(",")) {
920
+ const eq = pair.indexOf("=");
921
+ const key = eq >= 0 ? pair.slice(0, eq) : pair;
922
+ const val = eq >= 0 ? pair.slice(eq + 1) : "";
923
+ if (key === "context")
924
+ context = val;
925
+ else if (key === "capabilities")
926
+ capabilities = val;
927
+ }
928
+ }
929
+ /* override Claude Code configuration */
930
+ env.ANTHROPIC_API_KEY = "";
931
+ env.ANTHROPIC_AUTH_TOKEN = process.env.OPENROUTER_API_KEY;
932
+ env.ANTHROPIC_BASE_URL = "https://openrouter.ai/api";
933
+ env.ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES = capabilities;
934
+ env.ANTHROPIC_DEFAULT_HAIKU_MODEL = model;
935
+ env.ANTHROPIC_DEFAULT_OPUS_MODEL = model;
936
+ env.ANTHROPIC_DEFAULT_SONNET_MODEL = model;
903
937
  env.CLAUDE_CODE_SUBAGENT_MODEL = model;
938
+ env.CLAUDE_CODE_ATTRIBUTION_HEADER = "0";
939
+ env.CLAUDE_CODE_AUTO_COMPACT_WINDOW = context;
904
940
  env.DISABLE_LOGIN_COMMAND = "1";
905
941
  env.DISABLE_LOGOUT_COMMAND = "1";
906
942
  }
907
943
  else if (claudeModel !== "")
908
944
  throw new Error(`invalid CLAUDE_MODEL "${claudeModel}" ` +
909
- "(supports only: \"ollama[://<host>[:<port>]]/<model>[?[context=<size>],[capabilities=<list>]]\"");
945
+ "(supports only: \"ollama[://<host>[:<port>]]/<model>[?[context=<size>],[capabilities=<list>]]\" " +
946
+ "and \"openrouter:<model>[?[context=<size>],[capabilities=<list>]]\"");
910
947
  /* override ASE configuration (for its diagram rendering) */
911
948
  if (opts.ase) {
912
949
  if (env.ASE_TERM_WIDTH === undefined) {
package/claudex.ts CHANGED
@@ -994,15 +994,51 @@ const actionDefault = (opts: TopOpts, args: string[]): never => {
994
994
  env.ANTHROPIC_DEFAULT_HAIKU_MODEL = model
995
995
  env.ANTHROPIC_DEFAULT_OPUS_MODEL = model
996
996
  env.ANTHROPIC_DEFAULT_SONNET_MODEL = model
997
+ env.CLAUDE_CODE_SUBAGENT_MODEL = model
997
998
  env.CLAUDE_CODE_ATTRIBUTION_HEADER = "0"
998
999
  env.CLAUDE_CODE_AUTO_COMPACT_WINDOW = context
1000
+ env.DISABLE_LOGIN_COMMAND = "1"
1001
+ env.DISABLE_LOGOUT_COMMAND = "1"
1002
+ }
1003
+ else if (/^openrouter:/.test(claudeModel)) {
1004
+ /* parse openrouter:<model>[?[context=<size>],[capabilities=<list>]] */
1005
+ const remainder = claudeModel.slice("openrouter:".length)
1006
+ const qIdx = remainder.indexOf("?")
1007
+ const model = qIdx >= 0 ? remainder.slice(0, qIdx) : remainder
1008
+ if (model === "")
1009
+ fatal("invalid CLAUDE_MODEL: missing model name in " +
1010
+ `"${claudeModel}" (expected: openrouter:<model>[?...])`)
1011
+ let context = "200k"
1012
+ let capabilities = ""
1013
+ if (qIdx >= 0) {
1014
+ const query = remainder.slice(qIdx + 1)
1015
+ for (const pair of query.split(",")) {
1016
+ const eq = pair.indexOf("=")
1017
+ const key = eq >= 0 ? pair.slice(0, eq) : pair
1018
+ const val = eq >= 0 ? pair.slice(eq + 1) : ""
1019
+ if (key === "context") context = val
1020
+ else if (key === "capabilities") capabilities = val
1021
+ }
1022
+ }
1023
+
1024
+ /* override Claude Code configuration */
1025
+ env.ANTHROPIC_API_KEY = ""
1026
+ env.ANTHROPIC_AUTH_TOKEN = process.env.OPENROUTER_API_KEY
1027
+ env.ANTHROPIC_BASE_URL = "https://openrouter.ai/api"
1028
+ env.ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES = capabilities
1029
+ env.ANTHROPIC_DEFAULT_HAIKU_MODEL = model
1030
+ env.ANTHROPIC_DEFAULT_OPUS_MODEL = model
1031
+ env.ANTHROPIC_DEFAULT_SONNET_MODEL = model
999
1032
  env.CLAUDE_CODE_SUBAGENT_MODEL = model
1033
+ env.CLAUDE_CODE_ATTRIBUTION_HEADER = "0"
1034
+ env.CLAUDE_CODE_AUTO_COMPACT_WINDOW = context
1000
1035
  env.DISABLE_LOGIN_COMMAND = "1"
1001
1036
  env.DISABLE_LOGOUT_COMMAND = "1"
1002
1037
  }
1003
1038
  else if (claudeModel !== "")
1004
1039
  throw new Error(`invalid CLAUDE_MODEL "${claudeModel}" ` +
1005
- "(supports only: \"ollama[://<host>[:<port>]]/<model>[?[context=<size>],[capabilities=<list>]]\"")
1040
+ "(supports only: \"ollama[://<host>[:<port>]]/<model>[?[context=<size>],[capabilities=<list>]]\" " +
1041
+ "and \"openrouter:<model>[?[context=<size>],[capabilities=<list>]]\"")
1006
1042
 
1007
1043
  /* override ASE configuration (for its diagram rendering) */
1008
1044
  if (opts.ase) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rse/claudex",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "description": "Claude Code eXtended",
6
6
  "type": "module",
7
7
  "keywords": [ "claude", "code", "extension", "wrapper" ],