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,
|
OllamaSituationalSocialReadInferer,
|
||||||
PermissionEngine,
|
PermissionEngine,
|
||||||
createStateStorage,
|
createStateStorage,
|
||||||
ensureRepoFaceInitialized,
|
|
||||||
faceRegistryAsRepoDiscordRegistry,
|
faceRegistryAsRepoDiscordRegistry,
|
||||||
findRepoDiscordIdentityByPersonaName,
|
findRepoDiscordIdentityByPersonaName,
|
||||||
findRepoDiscordIdentityByRoleIds,
|
findRepoDiscordIdentityByRoleIds,
|
||||||
|
|
@ -431,15 +430,6 @@ export async function startBot(): Promise<void> {
|
||||||
console.log(`Ignored empty repo Face mention ${message.id} for ${identity.id}.`);
|
console.log(`Ignored empty repo Face mention ${message.id} for ${identity.id}.`);
|
||||||
continue;
|
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({
|
const queuedMention = await queueRepoFaceMention({
|
||||||
statePath: config.repoFaceHeartbeats.statePath,
|
statePath: config.repoFaceHeartbeats.statePath,
|
||||||
identity,
|
identity,
|
||||||
|
|
@ -454,9 +444,7 @@ export async function startBot(): Promise<void> {
|
||||||
queuedCount += 1;
|
queuedCount += 1;
|
||||||
}
|
}
|
||||||
console.log(
|
console.log(
|
||||||
`Queued repo Face mention ${message.id} for ${identity.id} via CTB turn queue (${queuedMention.pendingCount} pending). Birth status: ${
|
`Queued repo Face mention ${message.id} for ${identity.id} via CTB turn queue (${queuedMention.pendingCount} pending).`,
|
||||||
faceInitialization.birthStatusPath ?? faceInitialization.skippedReason ?? "unknown"
|
|
||||||
}`,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (queuedCount === 0) {
|
if (queuedCount === 0) {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ function scheduleNext(): void {
|
||||||
await runTick();
|
await runTick();
|
||||||
scheduleNext();
|
scheduleNext();
|
||||||
}, intervalMs);
|
}, intervalMs);
|
||||||
timer.unref();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function shutdown(signal: string): Promise<void> {
|
async function shutdown(signal: string): Promise<void> {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import {
|
||||||
buildEpiphanyIdentityRegistry,
|
buildEpiphanyIdentityRegistry,
|
||||||
ContextBuilder,
|
ContextBuilder,
|
||||||
createStateStorage,
|
createStateStorage,
|
||||||
ensureRepoFaceInitialized,
|
|
||||||
getRepoFaceSourceRepoName,
|
getRepoFaceSourceRepoName,
|
||||||
getRepoDiscordIdentityAllowedChannelIds,
|
getRepoDiscordIdentityAllowedChannelIds,
|
||||||
faceRegistryAsRepoDiscordRegistry,
|
faceRegistryAsRepoDiscordRegistry,
|
||||||
|
|
@ -554,17 +553,6 @@ async function queueRepoFaceTurn(input: {
|
||||||
}
|
}
|
||||||
|
|
||||||
const contextBuilder = new ContextBuilder();
|
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({
|
const recentMessages = await fetchRecentDiscordMessages({
|
||||||
botToken: input.config.botToken,
|
botToken: input.config.botToken,
|
||||||
channelId,
|
channelId,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue