@rse/claudex 1.0.2 → 1.0.3

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,11 @@
2
2
  ChangeLog
3
3
  =========
4
4
 
5
+ 1.0.3 (2026-05-10)
6
+ ------------------
7
+
8
+ - BUGFIX: ignore global -T (tmux) option of claude -p (print) option is present
9
+
5
10
  1.0.2 (2026-05-10)
6
11
  ------------------
7
12
 
package/claudex.js CHANGED
@@ -1027,6 +1027,8 @@ const main = async () => {
1027
1027
  ];
1028
1028
  const isClaudeNative = claudeNativeSubcmds.includes(subcmd);
1029
1029
  if (envFlags !== "" && subcmd !== "internal" && !isClaudeNative) {
1030
+ const tokens = envFlags.split(/\s+/).filter((t) => t !== "");
1031
+ /* provide check whether global options are present */
1030
1032
  const aliases = {
1031
1033
  "-R": "--recolor", "--recolor": "-R",
1032
1034
  "-C": "--capsula", "--capsula": "-C",
@@ -1041,8 +1043,24 @@ const main = async () => {
1041
1043
  return true;
1042
1044
  return false;
1043
1045
  };
1044
- const tokens = envFlags.split(/\s+/).filter((t) => t !== "");
1045
- const toInsert = tokens.filter((t) => !present(t));
1046
+ /* ignore "-T"/"--tmux" from CLAUDEX_FLAGS when claude is
1047
+ invoked with any of these options, as the corresponding
1048
+ non-interactive or session-related modes are incompatible
1049
+ with wrapping claude inside a Tmux session */
1050
+ const noTmuxOpts = ["-p"];
1051
+ const skipTmux = topArgs.some((a) => noTmuxOpts.includes(a));
1052
+ const filtered = [];
1053
+ for (let i = 0; i < tokens.length; i++) {
1054
+ const t = tokens[i];
1055
+ if (skipTmux && (t === "-T" || t === "--tmux")) {
1056
+ if (i + 1 < tokens.length && !tokens[i + 1].startsWith("-"))
1057
+ i++;
1058
+ continue;
1059
+ }
1060
+ filtered.push(t);
1061
+ }
1062
+ /* insert in front of the other arguments */
1063
+ const toInsert = filtered.filter((t) => !present(t));
1046
1064
  if (toInsert.length > 0)
1047
1065
  process.argv.splice(2, 0, ...toInsert);
1048
1066
  }
package/claudex.ts CHANGED
@@ -1132,6 +1132,9 @@ const main = async (): Promise<void> => {
1132
1132
  ]
1133
1133
  const isClaudeNative = claudeNativeSubcmds.includes(subcmd)
1134
1134
  if (envFlags !== "" && subcmd !== "internal" && !isClaudeNative) {
1135
+ const tokens = envFlags.split(/\s+/).filter((t) => t !== "")
1136
+
1137
+ /* provide check whether global options are present */
1135
1138
  const aliases: Record<string, string> = {
1136
1139
  "-R": "--recolor", "--recolor": "-R",
1137
1140
  "-C": "--capsula", "--capsula": "-C",
@@ -1146,8 +1149,26 @@ const main = async (): Promise<void> => {
1146
1149
  return true
1147
1150
  return false
1148
1151
  }
1149
- const tokens = envFlags.split(/\s+/).filter((t) => t !== "")
1150
- const toInsert = tokens.filter((t) => !present(t))
1152
+
1153
+ /* ignore "-T"/"--tmux" from CLAUDEX_FLAGS when claude is
1154
+ invoked with any of these options, as the corresponding
1155
+ non-interactive or session-related modes are incompatible
1156
+ with wrapping claude inside a Tmux session */
1157
+ const noTmuxOpts = [ "-p" ]
1158
+ const skipTmux = topArgs.some((a) => noTmuxOpts.includes(a))
1159
+ const filtered: string[] = []
1160
+ for (let i = 0; i < tokens.length; i++) {
1161
+ const t = tokens[i]
1162
+ if (skipTmux && (t === "-T" || t === "--tmux")) {
1163
+ if (i + 1 < tokens.length && !tokens[i + 1].startsWith("-"))
1164
+ i++
1165
+ continue
1166
+ }
1167
+ filtered.push(t)
1168
+ }
1169
+
1170
+ /* insert in front of the other arguments */
1171
+ const toInsert = filtered.filter((t) => !present(t))
1151
1172
  if (toInsert.length > 0)
1152
1173
  process.argv.splice(2, 0, ...toInsert)
1153
1174
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rse/claudex",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "Claude Code eXtended",
6
6
  "type": "module",
7
7
  "keywords": [ "claude", "code", "extension", "wrapper" ],