Separate Persona scheduling from Face provisioning
This commit is contained in:
parent
77ae48b82a
commit
e83111f7d5
3 changed files with 1 additions and 26 deletions
|
|
@ -15,7 +15,6 @@ import {
|
|||
OllamaSituationalSocialReadInferer,
|
||||
PermissionEngine,
|
||||
createStateStorage,
|
||||
ensureRepoFaceInitialized,
|
||||
faceRegistryAsRepoDiscordRegistry,
|
||||
findRepoDiscordIdentityByPersonaName,
|
||||
findRepoDiscordIdentityByRoleIds,
|
||||
|
|
@ -431,15 +430,6 @@ export async function startBot(): Promise<void> {
|
|||
console.log(`Ignored empty repo Face mention ${message.id} for ${identity.id}.`);
|
||||
continue;
|
||||
}
|
||||
const faceInitialization = await ensureRepoFaceInitialized({
|
||||
identity,
|
||||
storageRoot: config.storageRoot,
|
||||
sourceRepoRoot: config.sourceRepoRoot,
|
||||
epiphanyAgentRoot: config.epiphanyAgentRoot,
|
||||
workspaceRoot: process.cwd(),
|
||||
birthMode: config.repoFaceBirthMode,
|
||||
birthExecutor: config.repoFaceBirthExecutor,
|
||||
});
|
||||
const queuedMention = await queueRepoFaceMention({
|
||||
statePath: config.repoFaceHeartbeats.statePath,
|
||||
identity,
|
||||
|
|
@ -454,9 +444,7 @@ export async function startBot(): Promise<void> {
|
|||
queuedCount += 1;
|
||||
}
|
||||
console.log(
|
||||
`Queued repo Face mention ${message.id} for ${identity.id} via CTB turn queue (${queuedMention.pendingCount} pending). Birth status: ${
|
||||
faceInitialization.birthStatusPath ?? faceInitialization.skippedReason ?? "unknown"
|
||||
}`,
|
||||
`Queued repo Face mention ${message.id} for ${identity.id} via CTB turn queue (${queuedMention.pendingCount} pending).`,
|
||||
);
|
||||
}
|
||||
if (queuedCount === 0) {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ function scheduleNext(): void {
|
|||
await runTick();
|
||||
scheduleNext();
|
||||
}, intervalMs);
|
||||
timer.unref();
|
||||
}
|
||||
|
||||
async function shutdown(signal: string): Promise<void> {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import {
|
|||
buildEpiphanyIdentityRegistry,
|
||||
ContextBuilder,
|
||||
createStateStorage,
|
||||
ensureRepoFaceInitialized,
|
||||
getRepoFaceSourceRepoName,
|
||||
getRepoDiscordIdentityAllowedChannelIds,
|
||||
faceRegistryAsRepoDiscordRegistry,
|
||||
|
|
@ -554,17 +553,6 @@ async function queueRepoFaceTurn(input: {
|
|||
}
|
||||
|
||||
const contextBuilder = new ContextBuilder();
|
||||
if (identity.identityKind !== "native_persona") {
|
||||
await ensureRepoFaceInitialized({
|
||||
identity,
|
||||
storageRoot: input.config.storageRoot,
|
||||
sourceRepoRoot: input.config.sourceRepoRoot,
|
||||
epiphanyAgentRoot: input.config.epiphanyAgentRoot,
|
||||
workspaceRoot: process.cwd(),
|
||||
birthMode: input.config.repoFaceBirthMode,
|
||||
birthExecutor: input.config.repoFaceBirthExecutor,
|
||||
});
|
||||
}
|
||||
const recentMessages = await fetchRecentDiscordMessages({
|
||||
botToken: input.config.botToken,
|
||||
channelId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue