abtars 0.2.1-alpha.1 → 0.2.1-alpha.2

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/bundle/abtars.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  sanitizeOutbound,
17
17
  setIdleCompactReset,
18
18
  startSession
19
- } from "./chunk-WUTCGJDZ.js";
19
+ } from "./chunk-SMPIFP43.js";
20
20
  import {
21
21
  require_extension,
22
22
  require_permessage_deflate,
@@ -1288,7 +1288,7 @@ async function phasePlatforms(ctx) {
1288
1288
  registry.register("telegram", {
1289
1289
  configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
1290
1290
  async create() {
1291
- const { TelegramAdapter } = await import("./telegram-adapter-MVA33IO2.js");
1291
+ const { TelegramAdapter } = await import("./telegram-adapter-5SG4BFO6.js");
1292
1292
  const adapter = new TelegramAdapter(
1293
1293
  { botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
1294
1294
  { pipeline: pipelineDeps, conversationBuffer, transport, memory, sessionManager: ctx.sessionManager }
@@ -1327,7 +1327,7 @@ async function phasePlatforms(ctx) {
1327
1327
  registry.register("discord", {
1328
1328
  configured: Boolean(config.discord.enabled && config.discord.botToken),
1329
1329
  async create() {
1330
- const { DiscordAdapter } = await import("./discord-adapter-5DS7UTBE.js");
1330
+ const { DiscordAdapter } = await import("./discord-adapter-GWAFMN2H.js");
1331
1331
  const adapter = new DiscordAdapter(
1332
1332
  {
1333
1333
  botToken: config.discord.botToken,
@@ -1369,7 +1369,7 @@ async function phasePlatforms(ctx) {
1369
1369
  async create() {
1370
1370
  const { loadIrcConfig } = await import("./irc-config-6VY67UPQ.js");
1371
1371
  const { IrcAdapter } = await import("./irc-adapter-RKRUSZXB.js");
1372
- const { handleInboundMessage } = await import("./message-pipeline-CFVO73CK.js");
1372
+ const { handleInboundMessage } = await import("./message-pipeline-U2CGLUNH.js");
1373
1373
  const ircConfig = loadIrcConfig();
1374
1374
  if (!ircConfig) throw new Error("irc.json missing or empty");
1375
1375
  const adapter = new IrcAdapter(ircConfig, {
@@ -1982,12 +1982,13 @@ function createAgeCheckTask(deps) {
1982
1982
  };
1983
1983
  }
1984
1984
  function createDbIntegrityTask(memory) {
1985
- let counter = 0;
1985
+ let lastCheckAt = 0;
1986
+ const INTERVAL_MS = 60 * 60 * 1e3;
1986
1987
  return {
1987
1988
  name: "db-integrity",
1988
1989
  execute: async () => {
1989
- counter++;
1990
- if (counter % 72 !== 0) return;
1990
+ if (Date.now() - lastCheckAt < INTERVAL_MS) return;
1991
+ lastCheckAt = Date.now();
1991
1992
  if (!memory) return;
1992
1993
  const result = memory.maintenance.checkIntegrity();
1993
1994
  if (result !== "ok") {
@@ -2325,7 +2326,7 @@ async function phaseHeartbeat(ctx) {
2325
2326
  }
2326
2327
  ctx.selfHealerTask = selfHealerTask;
2327
2328
  pipelineDeps.selfHealerTask = selfHealerTask;
2328
- const { registerCommand } = await import("./commands-E3Y4QUNF.js");
2329
+ const { registerCommand } = await import("./commands-2JNT6SYN.js");
2329
2330
  for (const [name, handler2] of capabilities.commands) {
2330
2331
  registerCommand(name, handler2);
2331
2332
  }
@@ -2356,7 +2357,7 @@ async function phaseSleep(ctx) {
2356
2357
  return "skipped";
2357
2358
  }
2358
2359
  const { createSleepHandle } = await import("./sleep-BPWX3FCN.js");
2359
- const { killWakeInhibit } = await import("./commands-E3Y4QUNF.js");
2360
+ const { killWakeInhibit } = await import("./commands-2JNT6SYN.js");
2360
2361
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
2361
2362
  let subagent = null;
2362
2363
  const { getEnv: getEnv2 } = await import("./env-schema-XCPAJ6IZ.js");