instar 0.28.15 → 0.28.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAs0CD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA2nItE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2PH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA6zCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAomItE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -568,34 +568,26 @@ function wireTelegramCallbacks(telegram, sessionManager, state, quotaTracker, ac
568
568
  return sessionManager.isSessionAlive(sessionName);
569
569
  };
570
570
  // Stall verification — check if session has recent output activity
571
- // Shared activity patterns for detecting Claude Code session output
572
- const sessionActivePatterns = [
573
- /\bRead\b|\bWrite\b|\bEdit\b|\bBash\b|\bGrep\b|\bGlob\b|\bAgent\b|\bSkill\b|\bWebFetch\b|\bWebSearch\b/, // Tool names
574
- /⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/, // Spinner characters
575
- /\d+\s*tokens?/i, // Token counts
576
- /Sent \d+ chars/, // Telegram/Slack reply confirmation
577
- /Wandering|Thinking|thought for/i, // Claude thinking indicators
578
- /Searching for \d+ pattern/i, // Search activity
579
- /ctrl\+[a-z] to/i, // Interactive prompt hints
580
- /\+ .*\(thought for/, // Tool execution with thinking
581
- /mcp__/, // MCP tool calls
582
- /●|○|◉/, // Progress indicators
583
- ];
584
- /** Check if a session is actively producing output */
585
- const isSessionActiveCheck = async (sessionName) => {
571
+ telegram.onIsSessionActive = async (sessionName) => {
586
572
  const output = sessionManager.captureOutput(sessionName, 20);
587
573
  if (!output)
588
574
  return false;
589
575
  const lines = output.trim().split('\n').slice(-15);
576
+ // Look for signs of Claude Code activity in recent output
577
+ const activePatterns = [
578
+ /\bRead\b|\bWrite\b|\bEdit\b|\bBash\b|\bGrep\b|\bGlob\b/, // Tool names
579
+ /⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/, // Spinner characters
580
+ /\d+\s*tokens?/i, // Token counts
581
+ /Sent \d+ chars/, // Telegram reply confirmation
582
+ ];
590
583
  for (const line of lines) {
591
- for (const pattern of sessionActivePatterns) {
584
+ for (const pattern of activePatterns) {
592
585
  if (pattern.test(line))
593
586
  return true;
594
587
  }
595
588
  }
596
589
  return false;
597
590
  };
598
- telegram.onIsSessionActive = isSessionActiveCheck;
599
591
  // /switch-account — swap active Claude Code account
600
592
  if (accountSwitcher) {
601
593
  telegram.onSwitchAccountRequest = async (target, replyTopicId) => {
@@ -2745,31 +2737,6 @@ export async function startServer(options) {
2745
2737
  slackAdapter.onIsSessionAlive = (tmuxSession) => {
2746
2738
  return sessionManager.isSessionAlive(tmuxSession);
2747
2739
  };
2748
- slackAdapter.onIsSessionActive = async (sessionName) => {
2749
- const output = sessionManager.captureOutput(sessionName, 20);
2750
- if (!output)
2751
- return false;
2752
- const lines = output.trim().split('\n').slice(-15);
2753
- const activePatterns = [
2754
- /\bRead\b|\bWrite\b|\bEdit\b|\bBash\b|\bGrep\b|\bGlob\b|\bAgent\b|\bSkill\b|\bWebFetch\b|\bWebSearch\b/,
2755
- /⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏/,
2756
- /\d+\s*tokens?/i,
2757
- /Sent \d+ chars/,
2758
- /Wandering|Thinking|thought for/i,
2759
- /Searching for \d+ pattern/i,
2760
- /ctrl\+[a-z] to/i,
2761
- /\+ .*\(thought for/,
2762
- /mcp__/,
2763
- /●|○|◉/,
2764
- ];
2765
- for (const line of lines) {
2766
- for (const pattern of activePatterns) {
2767
- if (pattern.test(line))
2768
- return true;
2769
- }
2770
- }
2771
- return false;
2772
- };
2773
2740
  // Wire prompt response callback — inject button presses into sessions
2774
2741
  slackAdapter.onPromptResponse = (channelId, promptId, value) => {
2775
2742
  // Look up which session is bound to this channel