@waifucave/discord-waifus 1.5.199 → 1.5.200
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/orchestration/runtime.js +16 -3
- package/dist/orchestration/runtime.js.map +1 -1
- package/dist/shared/schemas/domain.d.ts +5 -0
- package/dist/shared/schemas/domain.js +5 -0
- package/dist/shared/schemas/domain.js.map +1 -1
- package/dist/storage/atomic.js +5 -0
- package/dist/storage/atomic.js.map +1 -1
- package/dist-frontend/assets/{index-Cs_fBpmK.js → index-CqcmhFV6.js} +2 -2
- package/dist-frontend/assets/{index-Cs_fBpmK.js.map → index-CqcmhFV6.js.map} +1 -1
- package/dist-frontend/index.html +1 -1
- package/package.json +1 -1
|
@@ -919,8 +919,9 @@ export class RuntimeOrchestrator {
|
|
|
919
919
|
return;
|
|
920
920
|
}
|
|
921
921
|
const orchestrator = await this.readAgentConfig("orchestrator", 40);
|
|
922
|
-
//
|
|
923
|
-
|
|
922
|
+
// Deterministic when: no global model configured (free mode), or this guild explicitly
|
|
923
|
+
// opted its channels into the model-free structural decider.
|
|
924
|
+
const deterministicMode = !orchestrator.modelId || server.orchestratorMode === "deterministic";
|
|
924
925
|
let messages = await this.options.discord.fetchFreshContext({
|
|
925
926
|
guildId,
|
|
926
927
|
channelId,
|
|
@@ -928,7 +929,7 @@ export class RuntimeOrchestrator {
|
|
|
928
929
|
signal
|
|
929
930
|
});
|
|
930
931
|
await this.noteActiveChatParticipantsFromContext(guildId, channelId, messages);
|
|
931
|
-
if (orchestrator.modelId) {
|
|
932
|
+
if (!deterministicMode && orchestrator.modelId) {
|
|
932
933
|
messages = await this.messagesForModel(messages, { providerId: orchestrator.providerId, modelId: orchestrator.modelId }, signal);
|
|
933
934
|
}
|
|
934
935
|
this.options.logger.info("Fetched Discord context for orchestrator", {
|
|
@@ -1748,6 +1749,14 @@ export class RuntimeOrchestrator {
|
|
|
1748
1749
|
}, this.stageManagerIdleDelayMs);
|
|
1749
1750
|
}
|
|
1750
1751
|
async runStageManager(guildId, channelId) {
|
|
1752
|
+
{
|
|
1753
|
+
// Per-guild kill switch: observers (and everything they feed) stay off for this server.
|
|
1754
|
+
const server = await this.ensureServer(guildId);
|
|
1755
|
+
if (!server.stageManagerEnabled) {
|
|
1756
|
+
this.options.logger.info("Stage manager disabled for this server; skipping run", { guildId, channelId });
|
|
1757
|
+
return { status: "disabled", message: "Stage manager is disabled for this server." };
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1751
1760
|
const state = await this.ensureChannelSession(guildId, channelId);
|
|
1752
1761
|
if (state.stageManager.active) {
|
|
1753
1762
|
return { status: "already_running" };
|
|
@@ -2169,6 +2178,10 @@ export class RuntimeOrchestrator {
|
|
|
2169
2178
|
// stable key has not yet been processed — so mutations from prior iterations cannot shift the
|
|
2170
2179
|
// nth position into a chunk we already handled.
|
|
2171
2180
|
async runDreamPass(guildId) {
|
|
2181
|
+
const server = await this.ensureServer(guildId);
|
|
2182
|
+
if (!server.stageManagerEnabled) {
|
|
2183
|
+
return { status: "disabled", applied: 0, skipped: 0, chunks: 0 };
|
|
2184
|
+
}
|
|
2172
2185
|
const config = await this.readAgentConfig("stage-manager", 80);
|
|
2173
2186
|
if (!config.enabled || !config.modelId) {
|
|
2174
2187
|
return { status: "disabled", applied: 0, skipped: 0, chunks: 0 };
|