clisbot 0.1.53-beta.1 → 0.1.53-beta.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.
Files changed (2) hide show
  1. package/dist/main.js +60 -19
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -76231,6 +76231,44 @@ function deriveConfiguredChannelConnection(params) {
76231
76231
  }
76232
76232
  return params.recordedConnection ?? "active";
76233
76233
  }
76234
+ function resolveRuntimeSummaryDefaultBot(params) {
76235
+ const defaultBotId = params.providerConfig.defaults.defaultBotId || "default";
76236
+ const hasDefaultBot = Object.prototype.hasOwnProperty.call(params.providerConfig, defaultBotId);
76237
+ if (params.providerConfig.defaults.enabled || hasDefaultBot) {
76238
+ return params.resolveBotConfig(defaultBotId);
76239
+ }
76240
+ return {
76241
+ id: defaultBotId,
76242
+ enabled: false,
76243
+ allowBots: params.providerConfig.defaults.allowBots,
76244
+ dmPolicy: params.providerConfig.defaults.dmPolicy,
76245
+ groupPolicy: params.providerConfig.defaults.groupPolicy,
76246
+ agentPrompt: params.providerConfig.defaults.agentPrompt,
76247
+ commandPrefixes: params.providerConfig.defaults.commandPrefixes,
76248
+ streaming: params.providerConfig.defaults.streaming,
76249
+ response: params.providerConfig.defaults.response,
76250
+ responseMode: params.providerConfig.defaults.responseMode,
76251
+ additionalMessageMode: params.providerConfig.defaults.additionalMessageMode,
76252
+ surfaceNotifications: resolveRuntimeSummarySurfaceNotifications(params.providerConfig.defaults.surfaceNotifications),
76253
+ verbose: params.providerConfig.defaults.verbose,
76254
+ followUp: params.providerConfig.defaults.followUp,
76255
+ timezone: params.providerConfig.defaults.timezone,
76256
+ directMessages: params.providerConfig.defaults.directMessages,
76257
+ groups: params.providerConfig.defaults.groups
76258
+ };
76259
+ }
76260
+ function resolveRuntimeSummarySurfaceNotifications(value) {
76261
+ if (!value?.queueStart || !value.loopStart) {
76262
+ return;
76263
+ }
76264
+ return {
76265
+ queueStart: value.queueStart,
76266
+ loopStart: value.loopStart
76267
+ };
76268
+ }
76269
+ function resolveRuntimeSummaryDirectMessageConfig(botConfig) {
76270
+ return resolveChannelDirectMessageConfig(botConfig);
76271
+ }
76234
76272
 
76235
76273
  // src/channels/slack/operator-inventory.ts
76236
76274
  var SLACK_TOKEN_DOC_URL = "https://api.slack.com/apps";
@@ -76271,8 +76309,11 @@ var slackChannelOperatorInventory = {
76271
76309
  order: 20,
76272
76310
  buildInput: ({ loadedConfig, runtimeRunning, activities, runtimeHealth }) => {
76273
76311
  const enabled = loadedConfig.raw.bots.slack.defaults.enabled;
76274
- const defaultBot = resolveSlackBotConfig(loadedConfig.raw.bots.slack, loadedConfig.raw.bots.slack.defaults.defaultBotId);
76275
- const defaultDmConfig = resolveSlackDirectMessageConfig(defaultBot);
76312
+ const defaultBot = resolveRuntimeSummaryDefaultBot({
76313
+ providerConfig: loadedConfig.raw.bots.slack,
76314
+ resolveBotConfig: (botId) => resolveSlackBotConfig(loadedConfig.raw.bots.slack, botId)
76315
+ });
76316
+ const defaultDmConfig = resolveRuntimeSummaryDirectMessageConfig(defaultBot);
76276
76317
  return {
76277
76318
  channel: "slack",
76278
76319
  enabled,
@@ -79011,8 +79052,11 @@ var telegramChannelOperatorInventory = {
79011
79052
  order: 10,
79012
79053
  buildInput: ({ loadedConfig, runtimeRunning, activities, runtimeHealth }) => {
79013
79054
  const enabled = loadedConfig.raw.bots.telegram.defaults.enabled;
79014
- const defaultBot = resolveTelegramBotConfig(loadedConfig.raw.bots.telegram, loadedConfig.raw.bots.telegram.defaults.defaultBotId);
79015
- const defaultDmConfig = resolveTelegramDirectMessageConfig(defaultBot);
79055
+ const defaultBot = resolveRuntimeSummaryDefaultBot({
79056
+ providerConfig: loadedConfig.raw.bots.telegram,
79057
+ resolveBotConfig: (botId) => resolveTelegramBotConfig(loadedConfig.raw.bots.telegram, botId)
79058
+ });
79059
+ const defaultDmConfig = resolveRuntimeSummaryDirectMessageConfig(defaultBot);
79016
79060
  return {
79017
79061
  channel: "telegram",
79018
79062
  enabled,
@@ -80536,8 +80580,11 @@ var zaloBotChannelOperatorInventory = {
80536
80580
  order: 30,
80537
80581
  buildInput: ({ loadedConfig, runtimeRunning, activities, runtimeHealth }) => {
80538
80582
  const enabled = loadedConfig.raw.bots.zaloBot.defaults.enabled;
80539
- const defaultBot = resolveZaloBotConfig(loadedConfig.raw.bots.zaloBot, loadedConfig.raw.bots.zaloBot.defaults.defaultBotId);
80540
- const defaultDmConfig = resolveZaloBotDirectMessageConfig(defaultBot);
80583
+ const defaultBot = resolveRuntimeSummaryDefaultBot({
80584
+ providerConfig: loadedConfig.raw.bots.zaloBot,
80585
+ resolveBotConfig: (botId) => resolveZaloBotConfig(loadedConfig.raw.bots.zaloBot, botId)
80586
+ });
80587
+ const defaultDmConfig = resolveRuntimeSummaryDirectMessageConfig(defaultBot);
80541
80588
  return {
80542
80589
  channel: "zalo-bot",
80543
80590
  enabled,
@@ -87726,7 +87773,7 @@ function renderUpdateHelp() {
87726
87773
  ` 1. Migration index: ${GITHUB_RAW_BASE}/docs/migrations/index.md`,
87727
87774
  " If Manual action: required, follow its runbook. If none, continue.",
87728
87775
  ` 2. Update guide: ${GITHUB_RAW_BASE}/docs/updates/update-guide.md`,
87729
- " Use for target choice, install flow, verification, and wrong-publish recovery.",
87776
+ " Use for target choice, install flow, and verification.",
87730
87777
  ` 3. Release notes: ${GITHUB_RAW_BASE}/docs/releases/README.md`,
87731
87778
  " Use for the canonical version map and full version notes.",
87732
87779
  ` 4. Release guides: ${GITHUB_RAW_BASE}/docs/updates/README.md`,
@@ -87734,13 +87781,6 @@ function renderUpdateHelp() {
87734
87781
  " 5. Full docs: https://github.com/longbkit/clisbot/tree/main/docs",
87735
87782
  " Use for deep questions. If needed, fetch or clone docs and inspect relevant files.",
87736
87783
  "",
87737
- "Recovery:",
87738
- " - If a version was published by mistake, publish the corrected target or tag first.",
87739
- " - Then deprecate the wrong version.",
87740
- " - Start with `npm login` in an attached session.",
87741
- " - If npm returns a browser approval URL, keep that same session open and continue it after approval.",
87742
- " - If the write command still returns EOTP, ask the operator for a current OTP and rerun the exact command with --otp=<code>.",
87743
- "",
87744
87784
  "Rules:",
87745
87785
  " - Use npm dist-tags, not highest semver.",
87746
87786
  " - Stable/latest is default; beta only when the user asks.",
@@ -88185,6 +88225,7 @@ async function getRunnerSessions(loadedConfig) {
88185
88225
  }
88186
88226
  }
88187
88227
  function buildChannelSummary(params) {
88228
+ const health = params.enabled ? params.health : undefined;
88188
88229
  return {
88189
88230
  channel: params.channel,
88190
88231
  enabled: params.enabled,
@@ -88203,12 +88244,12 @@ function buildChannelSummary(params) {
88203
88244
  healthSummary: deriveHealthSummary({
88204
88245
  channel: params.channel,
88205
88246
  connection: params.connection,
88206
- recordedSummary: params.health?.summary
88247
+ recordedSummary: health?.summary
88207
88248
  }),
88208
- healthDetail: params.health?.detail,
88209
- healthActions: params.health?.actions ?? [],
88210
- healthInstances: params.health?.instances ?? [],
88211
- healthUpdatedAt: params.health?.updatedAt
88249
+ healthDetail: health?.detail,
88250
+ healthActions: health?.actions ?? [],
88251
+ healthInstances: health?.instances ?? [],
88252
+ healthUpdatedAt: health?.updatedAt
88212
88253
  };
88213
88254
  }
88214
88255
  async function getRuntimeOperatorSummary(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clisbot",
3
- "version": "0.1.53-beta.1",
3
+ "version": "0.1.53-beta.3",
4
4
  "private": false,
5
5
  "description": "Chat surfaces for durable AI coding agents running in tmux",
6
6
  "license": "MIT",