@inetafrica/open-claudia 1.14.6 → 1.14.7

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.
Files changed (3) hide show
  1. package/bot-agent.js +8 -3
  2. package/bot.js +8 -3
  3. package/package.json +1 -1
package/bot-agent.js CHANGED
@@ -1011,12 +1011,17 @@ async function runClaudeAuthCommand(args, label, opts = {}) {
1011
1011
  pendingClaudeAuthLabel = null;
1012
1012
  const token = opts.captureToken ? extractClaudeToken(output) : null;
1013
1013
  if (token && !tokenStored) tokenStored = saveClaudeOAuthToken(token);
1014
- const final = redactSensitive(output.trim());
1014
+ const cleaned = redactSensitive(stripTerminalControls(output))
1015
+ .replace(/https?:\/\/github\.com\/vadimdemedes\/ink\S*/gi, "")
1016
+ .trim();
1017
+ const isTtyError = /raw mode is not supported|process\.stdin/i.test(output);
1015
1018
  if (tokenStored) {
1016
1019
  await send(`${label} finished. OAuth token stored for launchd/non-interactive Claude runs.`);
1017
1020
  await sendClaudeAuthStatusSummary("Post-auth check:");
1018
- } else if (final) {
1019
- await send(`${label} finished (exit ${code}).\n\n${final.slice(-2500)}`);
1021
+ } else if (isTtyError && opts.captureToken) {
1022
+ await send(`${label} cannot complete from this bot — the Claude CLI needs an interactive terminal for setup-token.\n\nRun this in your Mac terminal:\n claude setup-token\n\nThen paste the token here with:\n /use_oauth_token <token>`);
1023
+ } else if (cleaned) {
1024
+ await send(`${label} finished (exit ${code}).\n\n${cleaned.slice(-2500)}`);
1020
1025
  await sendClaudeAuthStatusSummary("Post-auth check:");
1021
1026
  } else {
1022
1027
  await send(`${label} finished (exit ${code}).`);
package/bot.js CHANGED
@@ -1073,12 +1073,17 @@ async function runClaudeAuthCommand(args, label, opts = {}) {
1073
1073
  pendingClaudeAuthLabel = null;
1074
1074
  const token = opts.captureToken ? extractClaudeToken(output) : null;
1075
1075
  if (token && !tokenStored) tokenStored = saveClaudeOAuthToken(token);
1076
- const final = redactSensitive(output.trim());
1076
+ const cleaned = redactSensitive(stripTerminalControls(output))
1077
+ .replace(/https?:\/\/github\.com\/vadimdemedes\/ink\S*/gi, "")
1078
+ .trim();
1079
+ const isTtyError = /raw mode is not supported|process\.stdin/i.test(output);
1077
1080
  if (tokenStored) {
1078
1081
  await send(`${label} finished. OAuth token stored for launchd/non-interactive Claude runs.`);
1079
1082
  await sendClaudeAuthStatusSummary("Post-auth check:");
1080
- } else if (final) {
1081
- await send(`${label} finished (exit ${code}).\n\n${final.slice(-2500)}`);
1083
+ } else if (isTtyError && opts.captureToken) {
1084
+ await send(`${label} cannot complete from this bot — the Claude CLI needs an interactive terminal for setup-token.\n\nRun this in your Mac terminal:\n claude setup-token\n\nThen paste the token here with:\n /use_oauth_token <token>`);
1085
+ } else if (cleaned) {
1086
+ await send(`${label} finished (exit ${code}).\n\n${cleaned.slice(-2500)}`);
1082
1087
  await sendClaudeAuthStatusSummary("Post-auth check:");
1083
1088
  } else {
1084
1089
  await send(`${label} finished (exit ${code}).`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "1.14.6",
3
+ "version": "1.14.7",
4
4
  "description": "Your always-on AI coding assistant — Claude Code via Telegram",
5
5
  "main": "bot.js",
6
6
  "bin": {