instar 0.24.17 → 0.24.18-beta.0

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/cli.js CHANGED
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAimCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAslGtE;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;AAyPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAimCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAylGtE;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"}
@@ -1893,13 +1893,9 @@ export async function startServer(options) {
1893
1893
  // Wire NotificationBatcher to Telegram and start batching
1894
1894
  notificationBatcher.setSendFunction(async (topicId, text) => {
1895
1895
  await telegram.sendToTopic(topicId, text);
1896
- // Mirror batched notifications to Slack attention channel
1897
- if (_slackAdapter) {
1898
- const slackAttentionChannel = state.get('slack-attention-channel');
1899
- if (slackAttentionChannel) {
1900
- _slackAdapter.sendToChannel(slackAttentionChannel, text).catch(() => { });
1901
- }
1902
- }
1896
+ // NOTE: Batched notifications (SUMMARY/DIGEST) are NOT mirrored to Slack.
1897
+ // Only IMMEDIATE notifications reach Slack (via the notify() gateway).
1898
+ // This prevents notification spam in the attention channel.
1903
1899
  return { messageId: 0 };
1904
1900
  });
1905
1901
  notificationBatcher.start();
@@ -3100,11 +3096,18 @@ export async function startServer(options) {
3100
3096
  if (!response.ok) {
3101
3097
  throw new Error(`Reply failed: ${response.status}`);
3102
3098
  }
3103
- // Mirror standby messages to Slack if available
3099
+ // Mirror standby messages to the CORRECT Slack channel (not attention channel).
3100
+ // PresenceProxy fires with a Telegram topicId. We need to find the session
3101
+ // bound to that topic, then find the Slack channel bound to that session.
3104
3102
  if (_slackAdapter && text.startsWith('🔭')) {
3105
- const slackAttentionChannel = state.get('slack-attention-channel');
3106
- if (slackAttentionChannel) {
3107
- _slackAdapter.sendToChannel(slackAttentionChannel, text).catch(() => { });
3103
+ // Find which session owns this Telegram topic
3104
+ const sessionName = telegram?.getSessionForTopic?.(topicId);
3105
+ if (sessionName) {
3106
+ // Find the Slack channel bound to that session
3107
+ const slackChannelId = _slackAdapter.getChannelForSession(sessionName);
3108
+ if (slackChannelId) {
3109
+ _slackAdapter.sendToChannel(slackChannelId, text).catch(() => { });
3110
+ }
3108
3111
  }
3109
3112
  }
3110
3113
  },