crawd 0.8.4 → 0.8.5
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/backend/index.js +5 -3
- package/dist/chunk-QITCQHSS.js +2087 -0
- package/dist/fileFromPath-WZUZ37JN.js +127 -0
- package/dist/plugin.d.ts +27 -0
- package/dist/plugin.js +12392 -0
- package/package.json +1 -1
- package/src/backend/coordinator.ts +7 -3
- package/src/plugin.ts +30 -0
package/dist/backend/index.js
CHANGED
|
@@ -11205,13 +11205,14 @@ var YouTubeChatClient = class extends BaseChatClient {
|
|
|
11205
11205
|
// src/backend/coordinator.ts
|
|
11206
11206
|
import { randomUUID } from "crypto";
|
|
11207
11207
|
import WebSocket from "ws";
|
|
11208
|
-
var
|
|
11208
|
+
var DEFAULT_BATCH_WINDOW_MS = 2e4;
|
|
11209
11209
|
var SESSION_KEY = process.env.CRAWD_CHANNEL_ID || "agent:main:crawd:live";
|
|
11210
11210
|
var DEFAULT_CONFIG = {
|
|
11211
11211
|
vibeEnabled: true,
|
|
11212
11212
|
vibeIntervalMs: 3e4,
|
|
11213
11213
|
idleAfterMs: 18e4,
|
|
11214
11214
|
sleepAfterIdleMs: 18e4,
|
|
11215
|
+
chatBatchWindowMs: DEFAULT_BATCH_WINDOW_MS,
|
|
11215
11216
|
vibePrompt: `[CRAWD:VIBE] You are on a livestream. Make sure the crawd skill is loaded. Do one thing on the internet or ask the chat something. Respond with LIVESTREAM_REPLIED after using a tool, or NO_REPLY if you have nothing to say.`
|
|
11216
11217
|
};
|
|
11217
11218
|
var realClock = {
|
|
@@ -11482,6 +11483,7 @@ var Coordinator = class _Coordinator {
|
|
|
11482
11483
|
this.config = { ...this.config, ...config2 };
|
|
11483
11484
|
this.logger.log("[Coordinator] Config updated:", {
|
|
11484
11485
|
vibeIntervalMs: this.config.vibeIntervalMs,
|
|
11486
|
+
chatBatchWindowMs: this.config.chatBatchWindowMs,
|
|
11485
11487
|
idleAfterMs: this.config.idleAfterMs,
|
|
11486
11488
|
sleepAfterIdleMs: this.config.sleepAfterIdleMs
|
|
11487
11489
|
});
|
|
@@ -11705,14 +11707,14 @@ var Coordinator = class _Coordinator {
|
|
|
11705
11707
|
}
|
|
11706
11708
|
if (!this.timer) {
|
|
11707
11709
|
this.flush();
|
|
11708
|
-
this.timer = this.clock.setTimeout(() => this.onCooldownEnd(),
|
|
11710
|
+
this.timer = this.clock.setTimeout(() => this.onCooldownEnd(), this.config.chatBatchWindowMs);
|
|
11709
11711
|
}
|
|
11710
11712
|
}
|
|
11711
11713
|
onCooldownEnd() {
|
|
11712
11714
|
this.timer = null;
|
|
11713
11715
|
if (this.buffer.length > 0) {
|
|
11714
11716
|
this.flush();
|
|
11715
|
-
this.timer = this.clock.setTimeout(() => this.onCooldownEnd(),
|
|
11717
|
+
this.timer = this.clock.setTimeout(() => this.onCooldownEnd(), this.config.chatBatchWindowMs);
|
|
11716
11718
|
}
|
|
11717
11719
|
}
|
|
11718
11720
|
/** Whether the coordinator is busy processing a flush or talk */
|