Rebuild repo Face turn review path
This commit is contained in:
parent
2b84082101
commit
d34675c971
18 changed files with 400 additions and 257 deletions
34
packages/core/src/face-identity-registry.ts
Normal file
34
packages/core/src/face-identity-registry.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { buildEpiphanyIdentityRegistry, faceToRepoDiscordIdentity } from "./epiphany-identities";
|
||||
import {
|
||||
loadRepoDiscordIdentityRegistry,
|
||||
type RepoDiscordIdentity,
|
||||
type RepoDiscordIdentityRegistry,
|
||||
} from "./repo-discord-identities";
|
||||
import type { EpiphanyIdentity, ResolvedFaceIdentity } from "./epiphany-identities";
|
||||
|
||||
export interface FaceIdentityRegistry {
|
||||
epiphanies: EpiphanyIdentity[];
|
||||
faces: ResolvedFaceIdentity[];
|
||||
repoIdentities: RepoDiscordIdentity[];
|
||||
legacyRepoRegistry: RepoDiscordIdentityRegistry;
|
||||
}
|
||||
|
||||
export async function loadFaceIdentityRegistry(path: string): Promise<FaceIdentityRegistry> {
|
||||
const legacyRepoRegistry = await loadRepoDiscordIdentityRegistry(path);
|
||||
const epiphanyRegistry = buildEpiphanyIdentityRegistry(legacyRepoRegistry);
|
||||
return {
|
||||
epiphanies: epiphanyRegistry.epiphanies,
|
||||
faces: epiphanyRegistry.faces,
|
||||
repoIdentities: epiphanyRegistry.faces.map(faceToRepoDiscordIdentity),
|
||||
legacyRepoRegistry,
|
||||
};
|
||||
}
|
||||
|
||||
export function faceRegistryAsRepoDiscordRegistry(
|
||||
registry: FaceIdentityRegistry,
|
||||
): RepoDiscordIdentityRegistry {
|
||||
return {
|
||||
identities: registry.repoIdentities,
|
||||
epiphanies: registry.epiphanies,
|
||||
};
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ export * from "./audit-log";
|
|||
export * from "./codex-mcp";
|
||||
export * from "./context-builder";
|
||||
export * from "./epiphany-identities";
|
||||
export * from "./face-identity-registry";
|
||||
export * from "./interaction-memory";
|
||||
export * from "./job-queue";
|
||||
export * from "./permission-engine";
|
||||
|
|
|
|||
Loading…
Reference in a new issue