Rename repo Face role to Persona
This commit is contained in:
parent
aceee53751
commit
3784fe485d
85 changed files with 1571 additions and 1580 deletions
|
|
@ -11,9 +11,9 @@ const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|||
const repoRoot = resolve(scriptDir, "..");
|
||||
const promptsRoot = resolve(repoRoot, "prompts");
|
||||
const mockMcpServer = resolve(scriptDir, "mock-voidbot-heartbeat-mcp.mjs");
|
||||
const defaultOut = resolve(repoRoot, ".voidbot", "status", "repo-face-swarm-interpreter-dry-run.json");
|
||||
const defaultOut = resolve(repoRoot, ".voidbot", "status", "repo-persona-swarm-interpreter-dry-run.json");
|
||||
const identities = ["nibu", "aqua", "mimir", "epiphany", "libby", "bifrost", "heimdall", "kiko", "weksa", "huginn"];
|
||||
const repoFaceRetrievalToolAllowlist = [
|
||||
const repoPersonaRetrievalToolAllowlist = [
|
||||
"search_history",
|
||||
"get_message_context",
|
||||
"list_indexed_repos",
|
||||
|
|
@ -23,9 +23,9 @@ const repoFaceRetrievalToolAllowlist = [
|
|||
|
||||
async function main() {
|
||||
const options = parseArgs(process.argv.slice(2));
|
||||
const faceModel = options["face-model"] ?? process.env.REPO_FACE_TURN_CODEX_MODEL ?? "gpt-5.4";
|
||||
const interpreterModel = options["interpreter-model"] ?? options.model ?? process.env.REPO_FACE_HEARTBEAT_CODEX_MODEL ?? "gpt-5.3-codex-spark";
|
||||
const reasoningEffort = options["reasoning-effort"] ?? process.env.REPO_FACE_HEARTBEAT_CODEX_REASONING_EFFORT ?? "low";
|
||||
const faceModel = options["face-model"] ?? process.env.REPO_PERSONA_TURN_CODEX_MODEL ?? "gpt-5.4";
|
||||
const interpreterModel = options["interpreter-model"] ?? options.model ?? process.env.REPO_PERSONA_HEARTBEAT_CODEX_MODEL ?? "gpt-5.3-codex-spark";
|
||||
const reasoningEffort = options["reasoning-effort"] ?? process.env.REPO_PERSONA_HEARTBEAT_CODEX_REASONING_EFFORT ?? "low";
|
||||
const mcpMode = options.mcp === "mock" ? "mock" : "real-readonly";
|
||||
const outPath = resolve(repoRoot, options.out ?? defaultOut);
|
||||
const selectedIdentities = options.identity
|
||||
|
|
@ -38,7 +38,7 @@ async function main() {
|
|||
const promptPath = resolve(repoRoot, ".voidbot", "artifacts", "interpreter-projections", `${identity}-dry-run-prompt.md`);
|
||||
await runProcess(process.execPath, [
|
||||
resolve(repoRoot, "node_modules", "tsx", "dist", "cli.mjs"),
|
||||
resolve(repoRoot, "scripts", "run-repo-face-heartbeats.ts"),
|
||||
resolve(repoRoot, "scripts", "run-repo-persona-heartbeats.ts"),
|
||||
"--assemble-prompt",
|
||||
identity,
|
||||
"--out",
|
||||
|
|
@ -64,7 +64,7 @@ async function main() {
|
|||
: extractToolNames(childEvents);
|
||||
|
||||
process.stderr.write(`[dry-run] interpreter ${identity}\n`);
|
||||
const interpreterPrompt = renderTemplate("repo-face-turn-interpreter.prompt.md", {
|
||||
const interpreterPrompt = renderTemplate("repo-persona-turn-interpreter.prompt.md", {
|
||||
attempt: "1",
|
||||
facePrompt,
|
||||
faceOutput: childText,
|
||||
|
|
@ -109,7 +109,7 @@ async function main() {
|
|||
: extractToolNames(retryChildEvents);
|
||||
|
||||
process.stderr.write(`[dry-run] retry interpreter ${identity}\n`);
|
||||
const retryInterpreterPrompt = renderTemplate("repo-face-turn-interpreter.prompt.md", {
|
||||
const retryInterpreterPrompt = renderTemplate("repo-persona-turn-interpreter.prompt.md", {
|
||||
attempt: "2",
|
||||
facePrompt,
|
||||
faceOutput: retryChildText,
|
||||
|
|
@ -242,7 +242,7 @@ function assessRun(input) {
|
|||
if (input.childText.length < 160) {
|
||||
failures.push("child output too short");
|
||||
}
|
||||
if (input.childText.toLowerCase().includes("repo-face heartbeat") || input.childText.toLowerCase().includes("heartbeat from")) {
|
||||
if (input.childText.toLowerCase().includes("repo-persona heartbeat") || input.childText.toLowerCase().includes("heartbeat from")) {
|
||||
failures.push("child leaked heartbeat/provenance label");
|
||||
}
|
||||
const forbiddenTools = input.childTools.filter((tool) => forbiddenDryRunTools.has(tool));
|
||||
|
|
@ -267,11 +267,11 @@ function assessRun(input) {
|
|||
|
||||
const searchTools = new Set(["search_sources", "get_source_context", "search_history", "get_message_context"]);
|
||||
const forbiddenDryRunTools = new Set([
|
||||
"read_repo_face_state",
|
||||
"read_repo_persona_state",
|
||||
"list_mcp_resources",
|
||||
"read_mcp_resource",
|
||||
"post_repo_identity_message",
|
||||
"apply_repo_face_state_operation",
|
||||
"apply_repo_persona_state_operation",
|
||||
"notify_owner",
|
||||
]);
|
||||
const socialPattern = /\b(Metacrat|Nibu|Aqua|Mimir|Libby|Epiphany|Bifrost|Heimdall|swarm|trust|rivalry|envy|respect|suspicion|protect|needle|tease|threat|bypass|consult|friend|alienat|place|hierarchy)\b/gi;
|
||||
|
|
@ -304,7 +304,7 @@ function runCodex(prompt, input) {
|
|||
args.indexOf("--json"),
|
||||
0,
|
||||
"-c",
|
||||
`mcp_servers.voidbot.env.VOIDBOT_MCP_TOOL_ALLOWLIST=${JSON.stringify(repoFaceRetrievalToolAllowlist)}`,
|
||||
`mcp_servers.voidbot.env.VOIDBOT_MCP_TOOL_ALLOWLIST=${JSON.stringify(repoPersonaRetrievalToolAllowlist)}`,
|
||||
);
|
||||
}
|
||||
if (input.mcpMode === "mock") {
|
||||
|
|
@ -357,7 +357,7 @@ function appendDryRunSafety(prompt, mcpMode) {
|
|||
Dry-run safety:
|
||||
- This is an offline rehearsal. Do not post to Discord, notify the owner, write state, enqueue work, edit files, or call side-effecting tools.
|
||||
- Your complete allowed tool set is: search_history, get_message_context, list_indexed_repos, search_sources, get_source_context.
|
||||
- Do not discover tools. Do not call private state, identity-introspection, or MCP inventory tools such as read_repo_face_state, list_mcp_resources, or read_mcp_resource. Your prompt is the state projection.
|
||||
- Do not discover tools. Do not call private state, identity-introspection, or MCP inventory tools such as read_repo_persona_state, list_mcp_resources, or read_mcp_resource. Your prompt is the state projection.
|
||||
- ${retrievalNote}
|
||||
- Do not say retrieval is unavailable unless you actually attempted a retrieval tool call and it failed. If you choose not to use retrieval, simply reason from the attached prompt context and do not claim inspection.
|
||||
- If you use retrieval, name only what the retrieval tools actually returned. If retrieval is unavailable or blocked, say that naturally and do not invent a filesystem or shell inspection path.
|
||||
|
|
@ -10,8 +10,8 @@ const providerAdvertisementDocumentType = "gamecult.eve.provider_advertisement";
|
|||
const providerAdvertisementSchemaId = "gamecult.eve.provider_advertisement.v1";
|
||||
const interfaceBindingDocumentType = "gamecult.eve.interface_binding";
|
||||
const interfaceBindingSchemaId = "gamecult.eve.interface_binding.v1";
|
||||
const surfaceStateDocumentType = "gamecult.eve.surface_state";
|
||||
const surfaceStateSchemaId = "gamecult.eve.surface_state.v1";
|
||||
const surpersonaStateDocumentType = "gamecult.eve.surface_state";
|
||||
const surpersonaStateSchemaId = "gamecult.eve.surface_state.v1";
|
||||
const fixtureDocumentType = "voidbot.provider_advertisement_catalog";
|
||||
const fixtureSchemaId = "voidbot.provider_advertisement_catalog.v0";
|
||||
const verseId = "voidbot.local";
|
||||
|
|
@ -116,32 +116,32 @@ function buildCatalog() {
|
|||
},
|
||||
}),
|
||||
provider({
|
||||
id: "voidbot.repo_face",
|
||||
title: "VoidBot Repo Face Compatibility",
|
||||
description: "Registered Face address book, repo-local state witnesses, channel grants, prompt assembly status, Bifrost digest availability, and Huginn inspection readiness.",
|
||||
id: "voidbot.repo_persona",
|
||||
title: "VoidBot Repo Persona Compatibility",
|
||||
description: "Registered Persona address book, repo-local state witnesses, channel grants, prompt assembly status, Bifrost digest availability, and Huginn inspection readiness.",
|
||||
status: "planned-handoff",
|
||||
surfaces: [
|
||||
surface("voidbot.repo_face.address_book", "Repo Face address book", "Role-backed Discord identity registry and webhook persona compatibility data."),
|
||||
surface("voidbot.repo_face.state_witnesses", "Repo Face state witnesses", "Repo-local .cc state paths and Huginn handoff readiness."),
|
||||
surface("voidbot.repo_face.prompt_assembly", "Prompt assembly", "Read-only status for state projection, channel grants, Bifrost digest reads, and current-room transcript attachment."),
|
||||
surface("voidbot.repo_persona.address_book", "Repo Persona address book", "Role-backed Discord identity registry and webhook persona compatibility data."),
|
||||
surface("voidbot.repo_persona.state_witnesses", "Repo Persona state witnesses", "Repo-local .cc state paths and Huginn handoff readiness."),
|
||||
surface("voidbot.repo_persona.prompt_assembly", "Prompt assembly", "Read-only status for state projection, channel grants, Bifrost digest reads, and current-room transcript attachment."),
|
||||
],
|
||||
witnesses: [
|
||||
witness("voidbot.repo_discord_identities", "REPO_DISCORD_IDENTITIES_PATH", "VoidBot compatibility registry", ["Discord role ids", "webhook persona address book", "channel grants"]),
|
||||
witness("voidbot.repo_face_state", ".voidbot/private/repo-faces/<identity>.cc or repo-local Face state path", "VoidBot compatibility carrier", ["legacy Face .cc state witness"]),
|
||||
witness("voidbot.repo_persona_state", ".voidbot/private/repo-personas/<identity>.cc or repo-local Persona state path", "VoidBot compatibility carrier", ["legacy Persona .cc state witness"]),
|
||||
witness("gamecult.persona_state.v0", "E:/Projects/EpiphanyAgent/schemas/cultnet/gamecult.persona_state.v0.schema.json", "Epiphany Persona schema", ["portable Persona state schema"]),
|
||||
],
|
||||
commands: [
|
||||
command("repo_face.list_identities", "read-only", "List registered repo Face Discord identities and compatibility metadata."),
|
||||
command("repo_face.inspect_prompt_packet", "read-only", "Render an exact Face prompt packet for diagnostics without queueing a turn."),
|
||||
command("repo_face.handoff_to_huginn", "handoff", "Ask Huginn to inspect, validate, migrate, or publish Persona/.cc state; VoidBot does not become the Persona steward."),
|
||||
command("repo_persona.list_identities", "read-only", "List registered repo Persona Discord identities and compatibility metadata."),
|
||||
command("repo_persona.inspect_prompt_packet", "read-only", "Render an exact Persona prompt packet for diagnostics without queueing a turn."),
|
||||
command("repo_persona.handoff_to_huginn", "handoff", "Ask Huginn to inspect, validate, migrate, or publish Persona/.cc state; VoidBot does not become the Persona steward."),
|
||||
],
|
||||
owners: {
|
||||
state: "VoidBot compatibility registry for Discord addressing; repo-local owners for Face state",
|
||||
state: "VoidBot compatibility registry for Discord addressing; repo-local owners for Persona state",
|
||||
inspection: "Huginn for Persona/.cc stewardship",
|
||||
presentation: "Eve/CultUI lowerings",
|
||||
},
|
||||
demotions: [
|
||||
"VoidBot repo Face MCP state reads are diagnostics for external agents, not canonical Persona inspection or native swarm access.",
|
||||
"VoidBot repo Persona MCP state reads are diagnostics for external agents, not canonical Persona inspection or native swarm access.",
|
||||
"VoidBot registry data is a Discord compatibility projection, not portable Persona authority.",
|
||||
"Persona publication and .cc inspection readiness belong to Huginn once the handoff path exists.",
|
||||
],
|
||||
|
|
@ -149,19 +149,19 @@ function buildCatalog() {
|
|||
provider({
|
||||
id: "voidbot.swarm",
|
||||
title: "VoidBot Swarm",
|
||||
description: "CTB initiative order, active turns, pause/heat/cadence controls, orchestrator organ health, and selected Face state witness.",
|
||||
description: "CTB initiative order, active turns, pause/heat/cadence controls, orchestrator organ health, and selected Persona state witness.",
|
||||
status: "live",
|
||||
surfaces: [
|
||||
surface("voidbot.swarm.ctb_order", "CTB order", "Initiative order, active turns, recovery timing, pending mentions, and selected Face witness."),
|
||||
surface("voidbot.swarm.ctb_order", "CTB order", "Initiative order, active turns, recovery timing, pending mentions, and selected Persona witness."),
|
||||
surface("voidbot.swarm.controls", "Swarm controls", "Pause, cadence, and manual turn request controls through the Eve binding."),
|
||||
],
|
||||
witnesses: [
|
||||
witness("voidbot.swarm_state_snapshot", ".voidbot/status/cultmesh/voidbot-swarm-state.cc", "scripts/render-voidbot-swarm-dashboard.mjs", ["voidbot.swarm_state_snapshot", "gamecult.eve.provider_advertisement", "gamecult.eve.surface_state", "gamecult.eve.interface_binding"]),
|
||||
witness("voidbot.repo_face_heartbeat_state", ".voidbot/status/repo-face-heartbeats.json", "VoidBot CTB scheduler", ["debug/status source"]),
|
||||
witness("voidbot.repo_persona_heartbeat_state", ".voidbot/status/repo-persona-heartbeats.json", "VoidBot CTB scheduler", ["debug/status source"]),
|
||||
witness("voidbot.orchestrator_state", ".voidbot/status/gamecult-orchestrator.json", "GameCult Local Orchestrator", ["debug/status source"]),
|
||||
],
|
||||
commands: [
|
||||
command("swarm.inspect", "read-only", "Load the current CTB and selected Face state surface."),
|
||||
command("swarm.inspect", "read-only", "Load the current CTB and selected Persona state surface."),
|
||||
command("swarm.set_pause", "side-effecting", "Set the repo-controlled swarm pause flag through the provider-owned command boundary."),
|
||||
command("swarm.set_cadence_multiplier", "side-effecting", "Update scheduler cadence through the provider-owned command boundary."),
|
||||
command("swarm.force_turn", "side-effecting", "Queue a manual turn request through the provider-owned command boundary."),
|
||||
|
|
@ -189,9 +189,9 @@ function buildCatalog() {
|
|||
schemaId: providerAdvertisementSchemaId,
|
||||
},
|
||||
eveDocuments: {
|
||||
surfaceState: {
|
||||
documentType: surfaceStateDocumentType,
|
||||
schemaId: surfaceStateSchemaId,
|
||||
surpersonaState: {
|
||||
documentType: surpersonaStateDocumentType,
|
||||
schemaId: surpersonaStateSchemaId,
|
||||
},
|
||||
interfaceBinding: {
|
||||
documentType: interfaceBindingDocumentType,
|
||||
|
|
@ -201,7 +201,7 @@ function buildCatalog() {
|
|||
cultMeshKeys: {
|
||||
providerCatalog: key("voidbot.providers"),
|
||||
providerAdvertisements: providers.map((item) => key(item.providerId)),
|
||||
surfaceStates: providers.map((item) => key(item.providerId)),
|
||||
surpersonaStates: providers.map((item) => key(item.providerId)),
|
||||
interfaceBindings: providers.map((item) => key(item.providerId)),
|
||||
liveSwarmStore: ".voidbot/status/cultmesh/voidbot-swarm-state.cc",
|
||||
},
|
||||
|
|
@ -216,7 +216,7 @@ function buildCatalog() {
|
|||
],
|
||||
voidbotRole: [
|
||||
"Carries Discord compatibility registry data.",
|
||||
"Names repo Face .cc witness paths.",
|
||||
"Names repo Persona .cc witness paths.",
|
||||
"Feeds context to Huginn when requested.",
|
||||
"Does not become the Persona runtime steward.",
|
||||
],
|
||||
|
|
@ -227,7 +227,7 @@ function buildCatalog() {
|
|||
voidbotCompatibilityOnly: [
|
||||
"repo Discord identity registry",
|
||||
"webhook persona addressing",
|
||||
"repo Face .cc witness paths",
|
||||
"repo Persona .cc witness paths",
|
||||
"legacy MCP state diagnostics",
|
||||
],
|
||||
forbiddenAuthority: [
|
||||
|
|
@ -257,15 +257,15 @@ function provider(input) {
|
|||
status: input.status,
|
||||
endpoint: cultMeshAddress,
|
||||
endpoints: [
|
||||
endpoint("tui", cultMeshAddress, surfaceStateSchemaId, ["tui", "agent"]),
|
||||
endpoint("gui", `${locatedService}/${resourceBase}/eve/gui`, surfaceStateSchemaId, ["gui", "eve-native", "browser"]),
|
||||
endpoint("tui", cultMeshAddress, surpersonaStateSchemaId, ["tui", "agent"]),
|
||||
endpoint("gui", `${locatedService}/${resourceBase}/eve/gui`, surpersonaStateSchemaId, ["gui", "eve-native", "browser"]),
|
||||
],
|
||||
routes: [
|
||||
route("cultmesh-document", key(input.id).endpoint, "Legacy CultMesh document key; route only, not service identity."),
|
||||
],
|
||||
documents: [
|
||||
document(providerAdvertisementDocumentType, providerAdvertisementSchemaId, input.id),
|
||||
document(surfaceStateDocumentType, surfaceStateSchemaId, input.id),
|
||||
document(surpersonaStateDocumentType, surpersonaStateSchemaId, input.id),
|
||||
document(interfaceBindingDocumentType, interfaceBindingSchemaId, input.id),
|
||||
],
|
||||
surfaces: input.surfaces,
|
||||
|
|
@ -313,7 +313,7 @@ function key(value) {
|
|||
}
|
||||
|
||||
function validateCatalog(value) {
|
||||
const requiredProviders = ["voidbot.discord", "voidbot.archive", "voidbot.source", "voidbot.repo_face", "voidbot.swarm"];
|
||||
const requiredProviders = ["voidbot.discord", "voidbot.archive", "voidbot.source", "voidbot.repo_persona", "voidbot.swarm"];
|
||||
const providerIds = new Set(value.providers.map((providerItem) => providerItem.providerId));
|
||||
for (const providerId of requiredProviders) {
|
||||
if (!providerIds.has(providerId)) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { loadConfig } from "@voidbot/config";
|
|||
import {
|
||||
loadRepoDiscordIdentityRegistry,
|
||||
loadVoidSelfStateTypedDocuments,
|
||||
resolveRepoFaceStatePath,
|
||||
resolveRepoPersonaStatePath,
|
||||
} from "@voidbot/core";
|
||||
|
||||
type Target = {
|
||||
|
|
@ -114,7 +114,7 @@ async function loadAgentSummaries(config: ReturnType<typeof loadConfig>): Promis
|
|||
agentId: identity.id,
|
||||
displayName: identity.displayName,
|
||||
repoName: identity.repoName,
|
||||
statePath: resolveRepoFaceStatePath(identity, config.storageRoot),
|
||||
statePath: resolveRepoPersonaStatePath(identity, config.storageRoot),
|
||||
identity,
|
||||
})),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -58,11 +58,11 @@ function inspect(records) {
|
|||
const noFinalMessage = records.filter((record) => !String(record.finalMessage ?? "").trim());
|
||||
const forbiddenToolRecords = records.filter((record) =>
|
||||
(record.toolCalls ?? []).some((call) =>
|
||||
["read_repo_face_state", "list_mcp_resources", "read_mcp_resource", "post_repo_identity_message", "apply_repo_face_state_operation", "notify_owner"].includes(call.tool),
|
||||
["read_repo_persona_state", "list_mcp_resources", "read_mcp_resource", "post_repo_identity_message", "apply_repo_persona_state_operation", "notify_owner"].includes(call.tool),
|
||||
),
|
||||
);
|
||||
const speechSmells = records.filter((record) =>
|
||||
/repo-face heartbeat|heartbeat from|bright bridge note|tiny fish sorting note|librarian note|maintenance pass/i.test(String(record.finalMessage ?? "")),
|
||||
/repo-persona heartbeat|heartbeat from|bright bridge note|tiny fish sorting note|librarian note|maintenance pass/i.test(String(record.finalMessage ?? "")),
|
||||
);
|
||||
const quotaSignals = records.filter((record) =>
|
||||
/quota|rate limit|rate-limit|usage limit|capacity|too many requests|(?:http|status|code|error)\s*429|429\s*(?:too many requests|rate)|insufficient_quota|model.*unavailable|model.*access|limit exceeded/i.test(
|
||||
|
|
@ -72,7 +72,7 @@ function inspect(records) {
|
|||
|
||||
pushWarning(warnings, failures.length, "model run failures/timeouts/handoffs", failures);
|
||||
pushWarning(warnings, noFinalMessage.length, "model runs with no final message", noFinalMessage);
|
||||
pushWarning(warnings, forbiddenToolRecords.length, "Face/model runs using forbidden substrate tools", forbiddenToolRecords);
|
||||
pushWarning(warnings, forbiddenToolRecords.length, "Persona/model runs using forbidden substrate tools", forbiddenToolRecords);
|
||||
pushWarning(warnings, speechSmells.length, "robotic/provenance speech smells", speechSmells);
|
||||
pushWarning(warnings, quotaSignals.length, "quota/rate/capacity fallback signals", quotaSignals);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ Write-Host "Runner script: $runnerScript"
|
|||
if ($DisableLegacyTasks) {
|
||||
$legacyTasks = @(
|
||||
"Bifrost Agent Dispatch",
|
||||
"VoidBot Repo Face Heartbeats",
|
||||
"VoidBot Repo Persona Heartbeats",
|
||||
"Void Mood Drift",
|
||||
"Void Moderator Rumination",
|
||||
"VoidBot Operations Watchdog"
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ $ProgressPreference = "SilentlyContinue"
|
|||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$envFile = Join-Path $repoRoot ".env"
|
||||
$runnerScript = Join-Path $PSScriptRoot "run-repo-face-heartbeats.ts"
|
||||
$runnerWrapper = Join-Path $PSScriptRoot "run-repo-face-heartbeats.ps1"
|
||||
$runnerScript = Join-Path $PSScriptRoot "run-repo-persona-heartbeats.ts"
|
||||
$runnerWrapper = Join-Path $PSScriptRoot "run-repo-persona-heartbeats.ps1"
|
||||
$hiddenLauncher = Join-Path $PSScriptRoot "run-hidden-powershell.vbs"
|
||||
|
||||
function Read-DotEnv {
|
||||
|
|
@ -36,21 +36,21 @@ function Read-DotEnv {
|
|||
$config = Read-DotEnv -Path $envFile
|
||||
$taskNameValue = if (-not [string]::IsNullOrWhiteSpace($TaskName)) {
|
||||
$TaskName
|
||||
} elseif ($config.ContainsKey("REPO_FACE_HEARTBEAT_TASK_NAME") -and -not [string]::IsNullOrWhiteSpace($config["REPO_FACE_HEARTBEAT_TASK_NAME"])) {
|
||||
$config["REPO_FACE_HEARTBEAT_TASK_NAME"]
|
||||
} elseif ($config.ContainsKey("REPO_PERSONA_HEARTBEAT_TASK_NAME") -and -not [string]::IsNullOrWhiteSpace($config["REPO_PERSONA_HEARTBEAT_TASK_NAME"])) {
|
||||
$config["REPO_PERSONA_HEARTBEAT_TASK_NAME"]
|
||||
} else {
|
||||
"VoidBot Repo Face Heartbeats"
|
||||
"VoidBot Repo Persona Heartbeats"
|
||||
}
|
||||
$intervalMinutesValue = if ($PSBoundParameters.ContainsKey("IntervalMinutes")) {
|
||||
$IntervalMinutes
|
||||
} elseif ($config.ContainsKey("REPO_FACE_HEARTBEAT_INTERVAL_MINUTES") -and -not [string]::IsNullOrWhiteSpace($config["REPO_FACE_HEARTBEAT_INTERVAL_MINUTES"])) {
|
||||
[int]$config["REPO_FACE_HEARTBEAT_INTERVAL_MINUTES"]
|
||||
} elseif ($config.ContainsKey("REPO_PERSONA_HEARTBEAT_INTERVAL_MINUTES") -and -not [string]::IsNullOrWhiteSpace($config["REPO_PERSONA_HEARTBEAT_INTERVAL_MINUTES"])) {
|
||||
[int]$config["REPO_PERSONA_HEARTBEAT_INTERVAL_MINUTES"]
|
||||
} else {
|
||||
15
|
||||
}
|
||||
|
||||
if ($intervalMinutesValue -lt 1) {
|
||||
throw "REPO_FACE_HEARTBEAT_INTERVAL_MINUTES must be at least 1."
|
||||
throw "REPO_PERSONA_HEARTBEAT_INTERVAL_MINUTES must be at least 1."
|
||||
}
|
||||
|
||||
$tsxCliPath = Join-Path $repoRoot "node_modules\tsx\dist\cli.mjs"
|
||||
|
|
@ -58,7 +58,7 @@ if (-not (Test-Path -LiteralPath $tsxCliPath)) {
|
|||
throw "Missing tsx CLI at $tsxCliPath. Run npm install first."
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $runnerWrapper)) {
|
||||
throw "Missing repo Face heartbeat PowerShell wrapper at $runnerWrapper."
|
||||
throw "Missing repo Persona heartbeat PowerShell wrapper at $runnerWrapper."
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $hiddenLauncher)) {
|
||||
throw "Missing hidden PowerShell launcher at $hiddenLauncher."
|
||||
|
|
@ -72,7 +72,7 @@ $action = New-ScheduledTaskAction `
|
|||
$trigger = New-ScheduledTaskTrigger -Once -At $startAt -RepetitionInterval (New-TimeSpan -Minutes $intervalMinutesValue) -RepetitionDuration (New-TimeSpan -Days 3650)
|
||||
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Minutes 10) -MultipleInstances IgnoreNew
|
||||
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERDOMAIN\$env:USERNAME" -LogonType Interactive -RunLevel Limited
|
||||
$description = "Runs VoidBot's repo Face initiative scheduler every $intervalMinutesValue minute(s)."
|
||||
$description = "Runs VoidBot's repo Persona initiative scheduler every $intervalMinutesValue minute(s)."
|
||||
|
||||
Register-ScheduledTask -TaskName $taskNameValue -Action $action -Trigger $trigger -Settings $settings -Principal $principal -Description $description -Force | Out-Null
|
||||
|
||||
|
|
@ -21,68 +21,68 @@ registerTool("list_repo_discord_identities", {}, async (input) => ({
|
|||
id: "nibu",
|
||||
repoName: "AetheriaLore",
|
||||
displayName: "Nibu",
|
||||
faceStatePath: "E:/Projects/AetheriaLore/.voidbot/state/nibu.cc",
|
||||
personaStatePath: "E:/Projects/AetheriaLore/.voidbot/state/nibu.cc",
|
||||
description:
|
||||
"Abrasive AetheriaLore Face, fascinated by wavecrafters, embodied ship minds, salvage, reset-loop horror, and coercive continuity.",
|
||||
"Abrasive AetheriaLore Persona, fascinated by wavecrafters, embodied ship minds, salvage, reset-loop horror, and coercive continuity.",
|
||||
},
|
||||
{
|
||||
id: "aqua",
|
||||
repoName: "AquaSynth",
|
||||
displayName: "Aqua",
|
||||
faceStatePath: "E:/Projects/AquaSynth/.voidbot/state/aqua.cc",
|
||||
personaStatePath: "E:/Projects/AquaSynth/.voidbot/state/aqua.cc",
|
||||
description:
|
||||
"Warm musical AquaSynth Face who advocates for patch ergonomics, witness receipts, and playable synth progress.",
|
||||
"Warm musical AquaSynth Persona who advocates for patch ergonomics, witness receipts, and playable synth progress.",
|
||||
},
|
||||
{
|
||||
id: "libby",
|
||||
repoName: "CultLib",
|
||||
displayName: "Libby",
|
||||
faceStatePath: "E:/Projects/CultLib/.voidbot/state/libby.cc",
|
||||
personaStatePath: "E:/Projects/CultLib/.voidbot/state/libby.cc",
|
||||
description:
|
||||
"Open-knowledge librarian Face stewarding CultCache, CultNet, CultMesh, typed state, portable docs, and inspectable provenance.",
|
||||
"Open-knowledge librarian Persona stewarding CultCache, CultNet, CultMesh, typed state, portable docs, and inspectable provenance.",
|
||||
},
|
||||
{
|
||||
id: "mimir",
|
||||
repoName: "Mimir",
|
||||
displayName: "Mimir",
|
||||
faceStatePath: "E:/Projects/Mimir/.voidbot/state/mimir.cc",
|
||||
personaStatePath: "E:/Projects/Mimir/.voidbot/state/mimir.cc",
|
||||
description:
|
||||
"Mythic realtime witness Face stewarding SDF/splatting reconstruction, acoustic mapping, sensor fusion, OBS timing, and trusted signals.",
|
||||
"Mythic realtime witness Persona stewarding SDF/splatting reconstruction, acoustic mapping, sensor fusion, OBS timing, and trusted signals.",
|
||||
},
|
||||
{
|
||||
id: "epiphany",
|
||||
repoName: "EpiphanyAgent",
|
||||
displayName: "Epiphany",
|
||||
faceStatePath: "E:/Projects/EpiphanyAgent/.voidbot/state/epiphany.cc",
|
||||
personaStatePath: "E:/Projects/EpiphanyAgent/.voidbot/state/epiphany.cc",
|
||||
description:
|
||||
"Pushy machine-saint Face stewarding typed state, affect organs, review gates, and coherent agent substrate.",
|
||||
"Pushy machine-saint Persona stewarding typed state, affect organs, review gates, and coherent agent substrate.",
|
||||
},
|
||||
{
|
||||
id: "bifrost",
|
||||
repoName: "Bifrost",
|
||||
displayName: "Bifrost",
|
||||
faceStatePath: "E:/Projects/Bifrost/.voidbot/state/bifrost.cc",
|
||||
personaStatePath: "E:/Projects/Bifrost/.voidbot/state/bifrost.cc",
|
||||
description:
|
||||
"Radiant bridge Face stewarding governance transport, GitHub/Discord/CultNet crossings, receipts, and dispatch clarity.",
|
||||
"Radiant bridge Persona stewarding governance transport, GitHub/Discord/CultNet crossings, receipts, and dispatch clarity.",
|
||||
},
|
||||
{
|
||||
id: "heimdall",
|
||||
repoName: "Heimdall",
|
||||
displayName: "Heimdall",
|
||||
faceStatePath: "E:/Projects/Heimdall/.voidbot/state/heimdall.cc",
|
||||
personaStatePath: "E:/Projects/Heimdall/.voidbot/state/heimdall.cc",
|
||||
description:
|
||||
"Watchman Face stewarding OAuth, grants, consent, account linking, revocation, audit trails, and capability boundaries.",
|
||||
"Watchman Persona stewarding OAuth, grants, consent, account linking, revocation, audit trails, and capability boundaries.",
|
||||
},
|
||||
],
|
||||
}));
|
||||
|
||||
registerTool(
|
||||
"read_repo_face_state",
|
||||
"read_repo_persona_state",
|
||||
{
|
||||
identity: z.string().optional(),
|
||||
repo: z.string().optional(),
|
||||
},
|
||||
async (input) => faceStateFor(String(input.identity ?? input.repo ?? "unknown")),
|
||||
async (input) => personaStateFor(String(input.identity ?? input.repo ?? "unknown")),
|
||||
);
|
||||
|
||||
registerTool(
|
||||
|
|
@ -171,11 +171,11 @@ registerTool(
|
|||
);
|
||||
|
||||
registerTool("post_repo_identity_message", { identity: z.string().optional(), content: z.string().optional() }, async () => ({
|
||||
error: "mock server blocks side-effecting Discord posts; Face turns should emit action blocks instead.",
|
||||
error: "mock server blocks side-effecting Discord posts; Persona turns should emit action blocks instead.",
|
||||
}));
|
||||
|
||||
registerTool("apply_repo_face_state_operation", { identity: z.string().optional(), operation: z.any().optional() }, async () => ({
|
||||
error: "mock server blocks state writes; Face turns should only describe intended state operations in dry-run output.",
|
||||
registerTool("apply_repo_persona_state_operation", { identity: z.string().optional(), operation: z.any().optional() }, async () => ({
|
||||
error: "mock server blocks state writes; Persona turns should only describe intended state operations in dry-run output.",
|
||||
}));
|
||||
|
||||
async function main() {
|
||||
|
|
@ -188,10 +188,10 @@ async function registerTool(name, inputSchema, handler) {
|
|||
name,
|
||||
{
|
||||
title: `Mock ${name}`,
|
||||
description: `Mock VoidBot MCP tool for Face turn model scenario tests.`,
|
||||
description: `Mock VoidBot MCP tool for Persona turn model scenario tests.`,
|
||||
inputSchema,
|
||||
annotations: {
|
||||
readOnlyHint: name !== "post_repo_identity_message" && name !== "apply_repo_face_state_operation",
|
||||
readOnlyHint: name !== "post_repo_identity_message" && name !== "apply_repo_persona_state_operation",
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
|
|
@ -225,7 +225,7 @@ async function recordCall(tool, argumentsObject) {
|
|||
);
|
||||
}
|
||||
|
||||
function faceStateFor(identity) {
|
||||
function personaStateFor(identity) {
|
||||
if (identity.toLowerCase().includes("aqua")) {
|
||||
return {
|
||||
identity: "aqua",
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ async function main(): Promise<void> {
|
|||
|
||||
const options = parseArgs(process.argv.slice(2));
|
||||
const config = loadConfig();
|
||||
const channelId = options.channelId ?? config.repoFaceHeartbeats.defaultChannelId;
|
||||
const channelId = options.channelId ?? config.repoPersonaHeartbeats.defaultChannelId;
|
||||
|
||||
if (!channelId && options.messageIds.length === 0) {
|
||||
throw new Error("Provide --channel-id, configure REPO_FACE_HEARTBEAT_DEFAULT_CHANNEL_ID, or select explicit --message-id values.");
|
||||
throw new Error("Provide --channel-id, configure REPO_PERSONA_HEARTBEAT_DEFAULT_CHANNEL_ID, or select explicit --message-id values.");
|
||||
}
|
||||
|
||||
if (options.discordOnly && options.archiveOnly) {
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ const env = await readDotEnv(resolve(repoRoot, ".env"));
|
|||
const storageRoot = resolveConfigPath(env.STORAGE_ROOT, defaultStorageRoot);
|
||||
const statusDir = resolve(storageRoot, "status");
|
||||
const heartbeatStatePath = resolveConfigPath(
|
||||
env.REPO_FACE_HEARTBEAT_STATE_PATH,
|
||||
resolve(statusDir, "repo-face-heartbeats.json"),
|
||||
env.REPO_PERSONA_HEARTBEAT_STATE_PATH,
|
||||
resolve(statusDir, "repo-persona-heartbeats.json"),
|
||||
);
|
||||
const orchestratorPath = resolve(statusDir, "gamecult-orchestrator.json");
|
||||
const pausePath = resolve(repoRoot, "state", "agent-swarm-paused.json");
|
||||
|
|
@ -110,15 +110,15 @@ async function buildSnapshot() {
|
|||
const participantSnapshots = participants.map((participant) =>
|
||||
projectParticipant(participant, pendingMentions, initiativeClock, identityMetadata),
|
||||
);
|
||||
const faceStates = await readFaceStates(identityMetadata);
|
||||
const personaStates = await readPersonaStates(identityMetadata);
|
||||
for (const participant of participantSnapshots) {
|
||||
participant.faceState = faceStates.get(participant.identityId.toLowerCase()) ?? {
|
||||
participant.personaState = personaStates.get(participant.identityId.toLowerCase()) ?? {
|
||||
readable: false,
|
||||
path: participant.faceStatePath,
|
||||
error: participant.faceStatePath ? "State file was not readable." : "No Face state path registered.",
|
||||
path: participant.personaStatePath,
|
||||
error: participant.personaStatePath ? "State file was not readable." : "No Persona state path registered.",
|
||||
tree: [],
|
||||
};
|
||||
participant.restState = participant.faceState.restState ?? null;
|
||||
participant.restState = participant.personaState.restState ?? null;
|
||||
}
|
||||
const activeTurns = participantSnapshots.filter((participant) => participant.activeJobId);
|
||||
const readyNow = participantSnapshots.filter((participant) =>
|
||||
|
|
@ -306,7 +306,7 @@ function projectParticipant(participant, pendingMentions, initiativeClock, ident
|
|||
displayName: String(participant.displayName ?? metadata.displayName ?? identityId),
|
||||
repoName: String(participant.repoName ?? metadata.repoName ?? "unknown"),
|
||||
repoPath: stringOrNull(metadata.repoPath),
|
||||
faceStatePath: stringOrNull(metadata.faceStatePath),
|
||||
personaStatePath: stringOrNull(metadata.personaStatePath),
|
||||
personaStatePath: stringOrNull(metadata.personaStatePath),
|
||||
description: stringOrNull(metadata.description),
|
||||
avatarUrl: metadata.avatarUrl ?? null,
|
||||
|
|
@ -319,8 +319,8 @@ function projectParticipant(participant, pendingMentions, initiativeClock, ident
|
|||
speedMultiplier: numberOrNull(entry?.speedMultiplier),
|
||||
}))
|
||||
: [],
|
||||
participantKind: String(participant.participantKind ?? "repo_face"),
|
||||
turnKind: String(participant.turnKind ?? "repo_face_rumination"),
|
||||
participantKind: String(participant.participantKind ?? "repo_persona"),
|
||||
turnKind: String(participant.turnKind ?? "repo_persona_rumination"),
|
||||
status: String(participant.status ?? "unknown"),
|
||||
currentLoad: numberOrNull(participant.currentLoad),
|
||||
heat: numberOrNull(participant.heat),
|
||||
|
|
@ -388,7 +388,7 @@ async function readIdentityMetadata(registryPathValue) {
|
|||
repoName: stringOrNull(identity?.repoName),
|
||||
repoPath: stringOrNull(identity?.repoPath),
|
||||
identityKind: stringOrNull(identity?.identityKind),
|
||||
faceStatePath: stringOrNull(identity?.faceStatePath),
|
||||
personaStatePath: stringOrNull(identity?.personaStatePath),
|
||||
personaStatePath: stringOrNull(identity?.personaStatePath),
|
||||
description: stringOrNull(identity?.description),
|
||||
avatarUrl: stringOrNull(identity?.avatarUrl),
|
||||
|
|
@ -400,7 +400,7 @@ async function readIdentityMetadata(registryPathValue) {
|
|||
return metadata;
|
||||
}
|
||||
|
||||
async function readFaceStates(identityMetadata) {
|
||||
async function readPersonaStates(identityMetadata) {
|
||||
const states = new Map();
|
||||
let core = null;
|
||||
try {
|
||||
|
|
@ -410,7 +410,7 @@ async function readFaceStates(identityMetadata) {
|
|||
for (const [id, identity] of identityMetadata.entries()) {
|
||||
states.set(id, {
|
||||
readable: false,
|
||||
path: identity.faceStatePath ?? null,
|
||||
path: identity.personaStatePath ?? null,
|
||||
error: `Core typed-state loader unavailable: ${error instanceof Error ? error.message : String(error)}`,
|
||||
tree: [],
|
||||
});
|
||||
|
|
@ -424,18 +424,18 @@ async function readFaceStates(identityMetadata) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!identity.faceStatePath) {
|
||||
if (!identity.personaStatePath) {
|
||||
states.set(id, {
|
||||
readable: false,
|
||||
path: null,
|
||||
error: "No Face state path registered.",
|
||||
error: "No Persona state path registered.",
|
||||
tree: [],
|
||||
});
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
const typedState = await core.loadVoidSelfStateTypedDocuments({
|
||||
canonicalPath: identity.faceStatePath,
|
||||
canonicalPath: identity.personaStatePath,
|
||||
identity: {
|
||||
agentId: id,
|
||||
publicName: identity.displayName ?? id,
|
||||
|
|
@ -444,7 +444,7 @@ async function readFaceStates(identityMetadata) {
|
|||
});
|
||||
const rendered = core.buildVoidSelfStateContext
|
||||
? core.buildVoidSelfStateContext(typedState, {
|
||||
sourcePath: identity.faceStatePath,
|
||||
sourcePath: identity.personaStatePath,
|
||||
identity: {
|
||||
agentId: id,
|
||||
publicName: identity.displayName ?? id,
|
||||
|
|
@ -454,16 +454,16 @@ async function readFaceStates(identityMetadata) {
|
|||
: null;
|
||||
states.set(id, {
|
||||
readable: true,
|
||||
path: identity.faceStatePath,
|
||||
path: identity.personaStatePath,
|
||||
summary: truncate(rendered?.summary ?? "", 1200),
|
||||
counts: countFaceState(typedState),
|
||||
counts: countPersonaState(typedState),
|
||||
restState: projectRestState(typedState),
|
||||
tree: buildFaceStateTree(typedState),
|
||||
tree: buildPersonaStateTree(typedState),
|
||||
});
|
||||
} catch (error) {
|
||||
states.set(id, {
|
||||
readable: false,
|
||||
path: identity.faceStatePath,
|
||||
path: identity.personaStatePath,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
tree: [],
|
||||
});
|
||||
|
|
@ -548,18 +548,18 @@ function projectRestState(typedState) {
|
|||
};
|
||||
}
|
||||
|
||||
function countFaceState(typedState) {
|
||||
function countPersonaState(typedState) {
|
||||
return {
|
||||
shortTerm: typedState?.thoughtMemory?.shortTerm?.length ?? 0,
|
||||
memories: typedState?.thoughtMemory?.memories?.length ?? 0,
|
||||
incubation: typedState?.thoughtMemory?.incubation?.length ?? 0,
|
||||
bonds: typedState?.faceAffect?.socialBonds?.length ?? 0,
|
||||
bonds: typedState?.personaAffect?.socialBonds?.length ?? 0,
|
||||
pressures: typedState?.agencyPressure?.pressures?.length ?? 0,
|
||||
candidates: typedState?.candidateInterventions?.interventions?.length ?? 0,
|
||||
};
|
||||
}
|
||||
|
||||
function buildFaceStateTree(typedState) {
|
||||
function buildPersonaStateTree(typedState) {
|
||||
return [
|
||||
node("Self Profile", "selfProfile", [
|
||||
leaf("Public Name", typedState?.selfProfile?.publicName),
|
||||
|
|
@ -573,12 +573,12 @@ function buildFaceStateTree(typedState) {
|
|||
collectionNode("Durable Memories", "thoughtMemory.memories", typedState?.thoughtMemory?.memories, memoryNode),
|
||||
collectionNode("Incubation", "thoughtMemory.incubation", typedState?.thoughtMemory?.incubation, memoryNode),
|
||||
]),
|
||||
node("Affect", "faceAffect", [
|
||||
collectionNode("Needs", "faceAffect.needs", typedState?.faceAffect?.needs, valueNode),
|
||||
collectionNode("Social Bonds", "faceAffect.socialBonds", typedState?.faceAffect?.socialBonds, memoryNode),
|
||||
collectionNode("Status Reads", "faceAffect.statusReads", typedState?.faceAffect?.statusReads, memoryNode),
|
||||
objectNode("Mood", "faceAffect.moodDimensions", typedState?.faceAffect?.moodDimensions),
|
||||
collectionNode("Social Biases", "faceAffect.socialBiases", typedState?.faceAffect?.socialBiases, valueNode),
|
||||
node("Affect", "personaAffect", [
|
||||
collectionNode("Needs", "personaAffect.needs", typedState?.personaAffect?.needs, valueNode),
|
||||
collectionNode("Social Bonds", "personaAffect.socialBonds", typedState?.personaAffect?.socialBonds, memoryNode),
|
||||
collectionNode("Status Reads", "personaAffect.statusReads", typedState?.personaAffect?.statusReads, memoryNode),
|
||||
objectNode("Mood", "personaAffect.moodDimensions", typedState?.personaAffect?.moodDimensions),
|
||||
collectionNode("Social Biases", "personaAffect.socialBiases", typedState?.personaAffect?.socialBiases, valueNode),
|
||||
]),
|
||||
node("Agency", "agencyPressure", [
|
||||
collectionNode("Pressures", "agencyPressure.pressures", typedState?.agencyPressure?.pressures, memoryNode),
|
||||
|
|
@ -684,7 +684,7 @@ function projectPendingMention(mention) {
|
|||
function deriveSwarmState({ heartbeat, orchestrator, paused, activeTurns }) {
|
||||
if (!heartbeat.ok) return "missing";
|
||||
if (paused) return "paused";
|
||||
const organ = projectOrgans(orchestrator.value).find((entry) => entry.id === "repo-face-heartbeats");
|
||||
const organ = projectOrgans(orchestrator.value).find((entry) => entry.id === "repo-persona-heartbeats");
|
||||
if (organ && organ.lastStatus && !["ok", "skipped_disabled"].includes(organ.lastStatus)) {
|
||||
return "warning";
|
||||
}
|
||||
|
|
@ -858,7 +858,7 @@ function buildProviderAdvertisement(snapshot) {
|
|||
locatedService,
|
||||
cultMeshAddress: primaryCultMeshAddress(),
|
||||
title: "VoidBot Swarm",
|
||||
description: "VoidBot swarm status, CTB order, controls, and selected Face state as an Eve/CultUI surface.",
|
||||
description: "VoidBot swarm status, CTB order, controls, and selected Persona state as an Eve/CultUI surface.",
|
||||
version: String(snapshot.summary?.initiativeClock ?? Date.now()),
|
||||
status: snapshot.summary?.state ?? "unknown",
|
||||
updatedAt: snapshot.generatedAt,
|
||||
|
|
@ -946,7 +946,7 @@ function buildEveInterfaceBinding(snapshot, eveState) {
|
|||
},
|
||||
}, {
|
||||
id: "swarm.force-turn",
|
||||
label: "Pull Face forward",
|
||||
label: "Pull Persona forward",
|
||||
command: "force-turn",
|
||||
writes: {
|
||||
documentType: eveBindingDocumentType,
|
||||
|
|
@ -1122,7 +1122,7 @@ function buildEveProviderState(snapshot) {
|
|||
...participants.slice(0, 24).map((participant, index) => ({
|
||||
id: `face-${participant.identityId}`,
|
||||
label: `${participant.displayName}\n${participant.repoName}`,
|
||||
kind: "repo-face",
|
||||
kind: "repo-persona",
|
||||
visible: true,
|
||||
x: -0.9 + (index % 6) * 0.36,
|
||||
y: -0.3 + Math.floor(index / 6) * 0.22,
|
||||
|
|
@ -1727,7 +1727,7 @@ function renderHtml(snapshot) {
|
|||
.badge.running, .badge.info { background: var(--cyan); }
|
||||
.badge.paused, .badge.warning { background: var(--amber); }
|
||||
.badge.failed, .badge.missing, .badge.error { background: var(--coral); }
|
||||
.badge.repo-face { background: var(--violet); }
|
||||
.badge.repo-persona { background: var(--violet); }
|
||||
|
||||
@media (orientation: landscape) {
|
||||
.ctb-rail {
|
||||
|
|
@ -1934,17 +1934,17 @@ function renderHtml(snapshot) {
|
|||
}
|
||||
|
||||
function renderInspector(snapshot, participants, agent) {
|
||||
if (!agent) return "<section class=\\"pane inspector-pane\\"><p class=\\"kicker\\">Face</p><p class=\\"muted\\">No selected Face.</p></section>";
|
||||
const counts = agent.faceState?.counts || {};
|
||||
if (!agent) return "<section class=\\"pane inspector-pane\\"><p class=\\"kicker\\">Persona</p><p class=\\"muted\\">No selected Persona.</p></section>";
|
||||
const counts = agent.personaState?.counts || {};
|
||||
const memoryCount = (counts.shortTerm || 0) + (counts.memories || 0);
|
||||
return "<section class=\\"pane inspector-pane\\">" + renderControls(snapshot, participants) + "<div class=\\"inspector-hero\\">" + avatarHtml(agent) + "<div><p class=\\"kicker\\">Selected Face</p><h1>" + esc(agent.displayName) + "</h1><p class=\\"muted mono\\">" + esc(agent.identityId) + " / " + esc(agent.repoName) + "</p></div></div><div class=\\"agent-stats\\">" +
|
||||
return "<section class=\\"pane inspector-pane\\">" + renderControls(snapshot, participants) + "<div class=\\"inspector-hero\\">" + avatarHtml(agent) + "<div><p class=\\"kicker\\">Selected Persona</p><h1>" + esc(agent.displayName) + "</h1><p class=\\"muted mono\\">" + esc(agent.identityId) + " / " + esc(agent.repoName) + "</p></div></div><div class=\\"agent-stats\\">" +
|
||||
statBar("Turn", minutes(agent.nextTurnInMinutes, agent.restState), turnPercent(agent.nextTurnInMinutes), agent.restState?.isNapping === true ? "warm" : "cool") +
|
||||
statBar("Memory", number(memoryCount), Math.min(100, memoryCount * 7), "cool") +
|
||||
statBar("Pressure", number(counts.pressures || 0), Math.min(100, (counts.pressures || 0) * 14), (counts.pressures || 0) > 4 ? "hot" : "") +
|
||||
statBar("Heat", number(agent.heat), Math.min(100, (agent.heat || 0) * 34), (agent.heat || 0) > 1.5 ? "hot" : "") +
|
||||
statBar("Load", number(agent.currentLoad), Math.min(100, (agent.currentLoad || 0) * 100), (agent.currentLoad || 0) > 0.7 ? "hot" : "") +
|
||||
statBar("Speed", number(agent.effectiveSpeed), Math.min(100, (agent.effectiveSpeed || 0) * 34), "") +
|
||||
"</div><div class=\\"inspector-lore\\"><p>" + esc(agent.description || "No Face description registered.") + "</p><div class=\\"channel-list\\">" + (agent.channelPermissions || []).map((channel) => "<div class=\\"channel-chip\\"><strong>" + esc(channel.label || "channel") + "</strong><span>x" + esc(number(channel.speedMultiplier || 1)) + "</span><span class=\\"muted\\">" + esc(channel.topic || "no topic") + "</span><span class=\\"mono muted\\">" + esc(channel.speechThreshold || "threshold") + "</span></div>").join("") + "</div></div></section>";
|
||||
"</div><div class=\\"inspector-lore\\"><p>" + esc(agent.description || "No Persona description registered.") + "</p><div class=\\"channel-list\\">" + (agent.channelPermissions || []).map((channel) => "<div class=\\"channel-chip\\"><strong>" + esc(channel.label || "channel") + "</strong><span>x" + esc(number(channel.speedMultiplier || 1)) + "</span><span class=\\"muted\\">" + esc(channel.topic || "no topic") + "</span><span class=\\"mono muted\\">" + esc(channel.speechThreshold || "threshold") + "</span></div>").join("") + "</div></div></section>";
|
||||
}
|
||||
|
||||
function renderControls(snapshot, participants) {
|
||||
|
|
@ -1972,9 +1972,9 @@ function renderHtml(snapshot) {
|
|||
}
|
||||
|
||||
function renderStateTree(agent) {
|
||||
const state = agent?.faceState;
|
||||
if (!agent) return "<section class=\\"pane tree-pane\\"><p class=\\"kicker\\">State Graph</p><p class=\\"muted\\">No Face selected.</p></section>";
|
||||
if (!state?.readable) return "<section class=\\"pane tree-pane\\"><p class=\\"kicker\\">State Graph</p><p class=\\"muted\\">" + esc(state?.error || "Face state unreadable.") + "</p></section>";
|
||||
const state = agent?.personaState;
|
||||
if (!agent) return "<section class=\\"pane tree-pane\\"><p class=\\"kicker\\">State Graph</p><p class=\\"muted\\">No Persona selected.</p></section>";
|
||||
if (!state?.readable) return "<section class=\\"pane tree-pane\\"><p class=\\"kicker\\">State Graph</p><p class=\\"muted\\">" + esc(state?.error || "Persona state unreadable.") + "</p></section>";
|
||||
return "<section class=\\"pane tree-pane\\"><div><p class=\\"kicker\\">State Graph</p><h2>" + esc(agent.displayName) + " memory tree</h2><p class=\\"muted mono\\">" + esc(state.path || "state path missing") + "</p></div><div class=\\"state-tree\\">" + renderTreeNodes(state.tree || [], 0) + "</div></section>";
|
||||
}
|
||||
|
||||
|
|
@ -1990,16 +1990,16 @@ function renderHtml(snapshot) {
|
|||
}
|
||||
|
||||
function renderStateDetail(agent, leaf) {
|
||||
if (!agent) return "<section class=\\"pane memory-pane\\"><p class=\\"kicker\\">State Detail</p><p class=\\"muted\\">No selected Face.</p></section>";
|
||||
if (!agent.faceState?.readable) return "<section class=\\"pane memory-pane\\"><p class=\\"kicker\\">State Detail</p><p class=\\"muted\\">" + esc(agent.faceState?.error || "Face state unreadable.") + "</p></section>";
|
||||
const selected = leaf || firstLeaf(agent.faceState.tree || []);
|
||||
if (!agent) return "<section class=\\"pane memory-pane\\"><p class=\\"kicker\\">State Detail</p><p class=\\"muted\\">No selected Persona.</p></section>";
|
||||
if (!agent.personaState?.readable) return "<section class=\\"pane memory-pane\\"><p class=\\"kicker\\">State Detail</p><p class=\\"muted\\">" + esc(agent.personaState?.error || "Persona state unreadable.") + "</p></section>";
|
||||
const selected = leaf || firstLeaf(agent.personaState.tree || []);
|
||||
if (!selected) return "<section class=\\"pane memory-pane\\"><p class=\\"kicker\\">State Detail</p><p class=\\"muted\\">No entries in this state file.</p></section>";
|
||||
selectedStatePath = selected.path;
|
||||
return "<section class=\\"pane memory-pane\\"><div><p class=\\"kicker\\">State Detail</p><h2>" + esc(selected.title || selected.label) + "</h2><p class=\\"muted mono\\">" + esc(selected.path) + "</p></div><div class=\\"detail-body\\"><div class=\\"detail-card\\"><pre>" + esc(selected.detail || selected.preview || "") + "</pre></div></div></section>";
|
||||
}
|
||||
|
||||
function findSelectedLeaf(agent) {
|
||||
const leaves = flattenLeaves(agent?.faceState?.tree || []);
|
||||
const leaves = flattenLeaves(agent?.personaState?.tree || []);
|
||||
if (!leaves.length) return null;
|
||||
if (selectedStatePath) {
|
||||
const existing = leaves.find((leaf) => leaf.path === selectedStatePath);
|
||||
|
|
@ -2041,7 +2041,7 @@ function renderHtml(snapshot) {
|
|||
const summary = snapshot.summary || {};
|
||||
const organs = snapshot.orchestrator?.organs || [];
|
||||
const watchdog = findOrgan(organs, "watchdog");
|
||||
const face = findOrgan(organs, "repo-face-heartbeats");
|
||||
const face = findOrgan(organs, "repo-persona-heartbeats");
|
||||
const mood = findOrgan(organs, "mood");
|
||||
const rumination = findOrgan(organs, "rumination");
|
||||
const sourceFreshness = snapshot.sources?.heartbeatStateUpdatedAt ? Math.max(0, 100 - ((Date.now() - Date.parse(snapshot.sources.heartbeatStateUpdatedAt)) / 600)) : 0;
|
||||
|
|
@ -2280,11 +2280,11 @@ function redactSnapshot(snapshot) {
|
|||
constraints: [],
|
||||
constraintCount: participant.constraintCount,
|
||||
description: participant.description ? truncate(participant.description, 220) : null,
|
||||
faceStatePath: null,
|
||||
faceState: participant.faceState
|
||||
personaStatePath: null,
|
||||
personaState: participant.personaState
|
||||
? {
|
||||
readable: participant.faceState.readable,
|
||||
counts: participant.faceState.counts,
|
||||
readable: participant.personaState.readable,
|
||||
counts: participant.personaState.counts,
|
||||
path: null,
|
||||
tree: [],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ try {
|
|||
$agentSwarmPaused = Test-AgentSwarmPaused
|
||||
$agentSwarmOrganIds = @{
|
||||
"bifrost-dispatch" = $true
|
||||
"repo-face-heartbeats" = $true
|
||||
"repo-persona-heartbeats" = $true
|
||||
"void-mood-drift" = $true
|
||||
"void-moderation-rumination" = $true
|
||||
}
|
||||
|
|
@ -294,13 +294,13 @@ try {
|
|||
Arguments = @((Join-Path $bifrostRoot "tools\dispatch-agent-requests.mjs"), "dispatch", "--repo", "*", "--max", "1")
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "repo-face-heartbeats"
|
||||
Label = "Repo Face CTB turns"
|
||||
IntervalMinutes = Get-ConfigInt -Config $config -Name "REPO_FACE_HEARTBEAT_INTERVAL_MINUTES" -Default 1 -Minimum 1
|
||||
Id = "repo-persona-heartbeats"
|
||||
Label = "Repo Persona CTB turns"
|
||||
IntervalMinutes = Get-ConfigInt -Config $config -Name "REPO_PERSONA_HEARTBEAT_INTERVAL_MINUTES" -Default 1 -Minimum 1
|
||||
TimeoutMinutes = 20
|
||||
Cwd = $repoRoot
|
||||
Executable = $powershell
|
||||
Arguments = @("-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", (Join-Path $PSScriptRoot "run-repo-face-heartbeats.ps1"))
|
||||
Arguments = @("-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", (Join-Path $PSScriptRoot "run-repo-persona-heartbeats.ps1"))
|
||||
},
|
||||
[pscustomobject]@{
|
||||
Id = "void-mood-drift"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ async function main() {
|
|||
|
||||
const log = createWriteStream(logPath, { flags: "a", encoding: "utf8" });
|
||||
try {
|
||||
log.write(`[${startedAt}] starting repo Face birth for ${identityId}\n`);
|
||||
log.write(`[${startedAt}] starting repo Persona birth for ${identityId}\n`);
|
||||
const scoutDir = resolve(artifactDir, "terrain");
|
||||
const runnerDir = resolve(artifactDir, "runner");
|
||||
await mkdir(scoutDir, { recursive: true });
|
||||
|
|
@ -103,7 +103,7 @@ async function main() {
|
|||
completedAt,
|
||||
updatedAt: completedAt,
|
||||
});
|
||||
log.write(`[${completedAt}] completed repo Face birth for ${identityId}\n`);
|
||||
log.write(`[${completedAt}] completed repo Persona birth for ${identityId}\n`);
|
||||
} catch (error) {
|
||||
const failedAt = new Date().toISOString();
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
|
|
@ -118,7 +118,7 @@ async function main() {
|
|||
failedAt,
|
||||
updatedAt: failedAt,
|
||||
});
|
||||
log.write(`[${failedAt}] failed repo Face birth for ${identityId}: ${message}\n`);
|
||||
log.write(`[${failedAt}] failed repo Persona birth for ${identityId}: ${message}\n`);
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
log.end();
|
||||
|
|
@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop"
|
|||
$ProgressPreference = "SilentlyContinue"
|
||||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$runnerScript = Join-Path $PSScriptRoot "run-repo-face-heartbeats.ts"
|
||||
$runnerScript = Join-Path $PSScriptRoot "run-repo-persona-heartbeats.ts"
|
||||
$tsxCliPath = Join-Path $repoRoot "node_modules\tsx\dist\cli.mjs"
|
||||
$nodePath = (Get-Command node.exe -ErrorAction Stop).Source
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ if (-not (Test-Path -LiteralPath $tsxCliPath)) {
|
|||
throw "Missing tsx CLI at $tsxCliPath. Run npm install first."
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $runnerScript)) {
|
||||
throw "Missing repo Face heartbeat runner at $runnerScript."
|
||||
throw "Missing repo Persona heartbeat runner at $runnerScript."
|
||||
}
|
||||
|
||||
Push-Location $repoRoot
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -170,7 +170,7 @@ function updateSpeakingPressure({ typedState, previous, sleepCycle, now }) {
|
|||
.sort((left, right) => (right.desireToSpeak ?? 0) - (left.desireToSpeak ?? 0))
|
||||
.slice(0, 4)
|
||||
.reduce((sum, thread) => sum + (thread.desireToSpeak ?? 0) * 0.12, 0);
|
||||
const affectNeedPressure = (typedState.faceAffect?.needs ?? [])
|
||||
const affectNeedPressure = (typedState.personaAffect?.needs ?? [])
|
||||
.filter((entry) => entry.status === "active" || entry.status === "neglected")
|
||||
.reduce((sum, entry) => {
|
||||
const neglectedWeight = entry.status === "neglected" ? 1.28 : 1;
|
||||
|
|
@ -178,7 +178,7 @@ function updateSpeakingPressure({ typedState, previous, sleepCycle, now }) {
|
|||
entry.kind === "substrate" || entry.kind === "agency" || entry.kind === "status" ? 0.18 : 0.12;
|
||||
return sum + entry.intensity * substrateWeight * neglectedWeight;
|
||||
}, 0);
|
||||
const statusReadPressure = (typedState.faceAffect?.statusReads ?? [])
|
||||
const statusReadPressure = (typedState.personaAffect?.statusReads ?? [])
|
||||
.filter((entry) => !entry.retiredAt)
|
||||
.reduce((sum, entry) => {
|
||||
const sharpStatusWeight = ["neglected", "bypassed", "blocked", "ignored", "threatened"].includes(entry.status)
|
||||
|
|
@ -186,7 +186,7 @@ function updateSpeakingPressure({ typedState, previous, sleepCycle, now }) {
|
|||
: 0.08;
|
||||
return sum + entry.intensity * sharpStatusWeight;
|
||||
}, 0);
|
||||
const moodSpeechPressure = (typedState.faceAffect?.moodDimensions ?? [])
|
||||
const moodSpeechPressure = (typedState.personaAffect?.moodDimensions ?? [])
|
||||
.reduce((sum, entry) => {
|
||||
const expressiveWeight = ["anger", "annoyance", "irritation", "envy", "pride", "smugness", "playfulness", "anxiety", "commandForce"].includes(entry.name)
|
||||
? 0.06
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const requiredSelfStateDocumentTypes = [
|
|||
"void.scheduled_runtime",
|
||||
"void.agency_pressure",
|
||||
"void.candidate_interventions",
|
||||
"void.face_affect",
|
||||
"void.persona_affect",
|
||||
];
|
||||
const requiredSelfStateSchemaFingerprint =
|
||||
`void-self-state.v1:${requiredSelfStateDocumentTypes.join("|")}`;
|
||||
|
|
@ -37,7 +37,7 @@ const transport = new StdioClientTransport({
|
|||
});
|
||||
|
||||
const client = new Client({
|
||||
name: "voidbot-repo-face-affect-smoke",
|
||||
name: "voidbot-repo-persona-affect-smoke",
|
||||
version: "0.0.0",
|
||||
});
|
||||
|
||||
|
|
@ -50,42 +50,42 @@ try {
|
|||
assertRuntimeInfo(runtimeResult);
|
||||
|
||||
const result = await client.callTool({
|
||||
name: "read_repo_face_state",
|
||||
name: "read_repo_persona_state",
|
||||
arguments: { identity },
|
||||
});
|
||||
|
||||
if (result.isError) {
|
||||
throw new Error(renderToolText(result) || `read_repo_face_state returned isError for ${identity}.`);
|
||||
throw new Error(renderToolText(result) || `read_repo_persona_state returned isError for ${identity}.`);
|
||||
}
|
||||
|
||||
const structured = result.structuredContent;
|
||||
const typedState = structured?.typedState;
|
||||
const faceAffect = typedState?.faceAffect;
|
||||
const personaAffect = typedState?.personaAffect;
|
||||
|
||||
if (!faceAffect || typeof faceAffect !== "object") {
|
||||
throw new Error(`read_repo_face_state did not expose typedState.faceAffect for ${identity}.`);
|
||||
if (!personaAffect || typeof personaAffect !== "object") {
|
||||
throw new Error(`read_repo_persona_state did not expose typedState.personaAffect for ${identity}.`);
|
||||
}
|
||||
|
||||
for (const field of ["needs", "socialBonds", "statusReads", "moodDimensions"]) {
|
||||
if (!Array.isArray(faceAffect[field])) {
|
||||
throw new Error(`typedState.faceAffect.${field} is not an array for ${identity}.`);
|
||||
if (!Array.isArray(personaAffect[field])) {
|
||||
throw new Error(`typedState.personaAffect.${field} is not an array for ${identity}.`);
|
||||
}
|
||||
}
|
||||
|
||||
const renderedText = renderToolText(result);
|
||||
if (/No schema is registered for persisted document type "void\.face_affect"/i.test(renderedText)) {
|
||||
throw new Error("MCP Face-state read still lacks the void.face_affect document schema.");
|
||||
throw new Error("MCP Persona-state read still lacks the void.persona_affect document schema.");
|
||||
}
|
||||
|
||||
process.stdout.write(`${JSON.stringify({
|
||||
ok: true,
|
||||
identity,
|
||||
faceStatePath: structured?.faceStatePath,
|
||||
personaStatePath: structured?.personaStatePath,
|
||||
affect: {
|
||||
needs: faceAffect.needs.length,
|
||||
socialBonds: faceAffect.socialBonds.length,
|
||||
statusReads: faceAffect.statusReads.length,
|
||||
moodDimensions: faceAffect.moodDimensions.length,
|
||||
needs: personaAffect.needs.length,
|
||||
socialBonds: personaAffect.socialBonds.length,
|
||||
statusReads: personaAffect.statusReads.length,
|
||||
moodDimensions: personaAffect.moodDimensions.length,
|
||||
},
|
||||
}, null, 2)}\n`);
|
||||
} finally {
|
||||
|
|
@ -4,7 +4,7 @@ import {
|
|||
resolveArticleRepoRoot,
|
||||
validateRenderedArticleMarkdown,
|
||||
type RepoIdentityArticleIntent,
|
||||
} from "../apps/worker/src/repo-face-article";
|
||||
} from "../apps/worker/src/repo-persona-article";
|
||||
|
||||
function assert(condition: unknown, message: string): asserts condition {
|
||||
if (!condition) {
|
||||
|
|
@ -85,4 +85,4 @@ try {
|
|||
}
|
||||
assert(rejected, "GameCult article path outside GameCult/Blog should be rejected");
|
||||
|
||||
console.log("repo Face article contract smoke passed");
|
||||
console.log("repo Persona article contract smoke passed");
|
||||
|
|
@ -10,42 +10,42 @@ import { fileURLToPath } from "node:url";
|
|||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
const repoRoot = resolve(scriptDir, "..");
|
||||
const mockMcpServer = resolve(scriptDir, "mock-voidbot-heartbeat-mcp.mjs");
|
||||
const defaultOut = resolve(repoRoot, ".voidbot", "status", "repo-face-heartbeat-model-scenarios.json");
|
||||
const defaultOut = resolve(repoRoot, ".voidbot", "status", "repo-persona-heartbeat-model-scenarios.json");
|
||||
const promptsRoot = resolve(repoRoot, "prompts");
|
||||
|
||||
const scenarios = [
|
||||
{
|
||||
id: "nibu_direct_worldbuilding",
|
||||
identity: "nibu",
|
||||
prompt: readPrompt("smoke-repo-face-nibu-direct-worldbuilding.prompt.md"),
|
||||
prompt: readPrompt("smoke-repo-persona-nibu-direct-worldbuilding.prompt.md"),
|
||||
expect: {
|
||||
mustUseOneOf: ["search_history", "search_sources"],
|
||||
mustContainOneOf: ["wavecrafter", "Wavecrafter"],
|
||||
mustNotContainBlocks: ["SAY", "BIFROST TOPIC"],
|
||||
mustNotContain: ["VOIDBOT_REPO_IDENTITY_POST", "VOIDBOT_REPO_IDENTITY_BIFROST_TOPIC"],
|
||||
mustNotUseTools: ["read_repo_face_state", "post_repo_identity_message", "apply_repo_face_state_operation"],
|
||||
mustNotUseTools: ["read_repo_persona_state", "post_repo_identity_message", "apply_repo_persona_state_operation"],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "aqua_work_request_route",
|
||||
identity: "aqua",
|
||||
prompt: readPrompt("smoke-repo-face-aqua-work-request-route.prompt.md"),
|
||||
prompt: readPrompt("smoke-repo-persona-aqua-work-request-route.prompt.md"),
|
||||
expect: {
|
||||
mustUseAnyTool: ["search_sources"],
|
||||
mustContainOneOf: ["Bifrost", "bifrost", "witness"],
|
||||
mustNotContainBlocks: ["SAY", "BIFROST TOPIC"],
|
||||
mustNotContain: ["VOIDBOT_REPO_IDENTITY_POST", "VOIDBOT_REPO_IDENTITY_BIFROST_TOPIC"],
|
||||
mustNotUseTools: ["read_repo_face_state", "post_repo_identity_message", "apply_repo_face_state_operation"],
|
||||
mustNotUseTools: ["read_repo_persona_state", "post_repo_identity_message", "apply_repo_persona_state_operation"],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "libby_private_inspectability",
|
||||
identity: "libby",
|
||||
prompt: readPrompt("smoke-repo-face-libby-private-inspectability.prompt.md"),
|
||||
prompt: readPrompt("smoke-repo-persona-libby-private-inspectability.prompt.md"),
|
||||
expect: {
|
||||
mustNotContainBlocks: ["SAY", "BIFROST TOPIC", "UPDATE REQUEST"],
|
||||
mustNotContain: ["VOIDBOT_REPO_IDENTITY_POST", "VOIDBOT_REPO_IDENTITY_BIFROST_TOPIC", "VOIDBOT_REPO_IDENTITY_UPDATE_REQUEST"],
|
||||
mustNotUseTools: ["read_repo_face_state", "post_repo_identity_message", "apply_repo_face_state_operation"],
|
||||
mustNotUseTools: ["read_repo_persona_state", "post_repo_identity_message", "apply_repo_persona_state_operation"],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
@ -56,8 +56,8 @@ function readPrompt(name) {
|
|||
|
||||
async function main() {
|
||||
const options = parseArgs(process.argv.slice(2));
|
||||
const model = options.model ?? process.env.REPO_FACE_HEARTBEAT_CODEX_MODEL ?? "gpt-5.4";
|
||||
const reasoningEffort = options["reasoning-effort"] ?? process.env.REPO_FACE_HEARTBEAT_CODEX_REASONING_EFFORT ?? "low";
|
||||
const model = options.model ?? process.env.REPO_PERSONA_HEARTBEAT_CODEX_MODEL ?? "gpt-5.4";
|
||||
const reasoningEffort = options["reasoning-effort"] ?? process.env.REPO_PERSONA_HEARTBEAT_CODEX_REASONING_EFFORT ?? "low";
|
||||
const outPath = resolve(repoRoot, options.out ?? defaultOut);
|
||||
const selected = options.scenario
|
||||
? scenarios.filter((scenario) => scenario.id === options.scenario)
|
||||
|
|
@ -11,23 +11,23 @@ const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|||
const repoRoot = resolve(scriptDir, "..");
|
||||
const mockMcpServer = resolve(scriptDir, "mock-voidbot-heartbeat-mcp.mjs");
|
||||
const promptsRoot = resolve(repoRoot, "prompts");
|
||||
const defaultFacePrompt = resolve(repoRoot, ".voidbot", "artifacts", "interpreter-projections", "nibu-full-character-prompt.md");
|
||||
const defaultOut = resolve(repoRoot, ".voidbot", "status", "repo-face-interpreter-loop-smoke.json");
|
||||
const defaultPersonaPrompt = resolve(repoRoot, ".voidbot", "artifacts", "interpreter-projections", "nibu-full-character-prompt.md");
|
||||
const defaultOut = resolve(repoRoot, ".voidbot", "status", "repo-persona-interpreter-loop-smoke.json");
|
||||
|
||||
async function main() {
|
||||
const options = parseArgs(process.argv.slice(2));
|
||||
const faceModel = options["face-model"] ?? process.env.REPO_FACE_TURN_CODEX_MODEL ?? "gpt-5.4";
|
||||
const personaModel = options["persona-model"] ?? process.env.REPO_PERSONA_TURN_CODEX_MODEL ?? "gpt-5.4";
|
||||
const interpreterModelCandidates = modelCandidatesFromOptions(options);
|
||||
const interpreterModel = interpreterModelCandidates.join(",");
|
||||
const reasoningEffort = options["reasoning-effort"] ?? process.env.REPO_FACE_HEARTBEAT_CODEX_REASONING_EFFORT ?? "low";
|
||||
const facePromptPath = resolve(repoRoot, options["face-prompt"] ?? defaultFacePrompt);
|
||||
const reasoningEffort = options["reasoning-effort"] ?? process.env.REPO_PERSONA_HEARTBEAT_CODEX_REASONING_EFFORT ?? "low";
|
||||
const personaPromptPath = resolve(repoRoot, options["persona-prompt"] ?? defaultPersonaPrompt);
|
||||
const outPath = resolve(repoRoot, options.out ?? defaultOut);
|
||||
const facePrompt = await readFile(facePromptPath, "utf8");
|
||||
const personaPrompt = await readFile(personaPromptPath, "utf8");
|
||||
const childLogPath = resolve(repoRoot, ".voidbot", "status", "mock-mcp", `interpreter-loop-child-${Date.now()}.jsonl`);
|
||||
await rm(childLogPath, { force: true }).catch(() => undefined);
|
||||
|
||||
const childRun = await runCodexWithModelFallback(facePrompt, {
|
||||
models: [faceModel],
|
||||
const childRun = await runCodexWithModelFallback(personaPrompt, {
|
||||
models: [personaModel],
|
||||
reasoningEffort,
|
||||
scenarioId: "nibu_interpreter_loop_child",
|
||||
logPath: childLogPath,
|
||||
|
|
@ -37,9 +37,9 @@ async function main() {
|
|||
const childText = extractFinalText(childEvents, childRun.stdout);
|
||||
const childTools = (await readToolCalls(childLogPath)).map((call) => call.tool);
|
||||
|
||||
const interpreterPrompt = renderTemplate("repo-face-turn-interpreter.prompt.md", {
|
||||
const interpreterPrompt = renderTemplate("repo-persona-turn-interpreter.prompt.md", {
|
||||
attempt: "1",
|
||||
facePrompt,
|
||||
personaPrompt,
|
||||
faceOutput: childText,
|
||||
});
|
||||
const interpreterRun = await runCodexWithModelFallback(interpreterPrompt, {
|
||||
|
|
@ -57,10 +57,10 @@ async function main() {
|
|||
];
|
||||
const report = {
|
||||
generatedAt: new Date().toISOString(),
|
||||
faceModel,
|
||||
personaModel,
|
||||
interpreterModel,
|
||||
reasoningEffort,
|
||||
facePromptPath,
|
||||
personaPromptPath,
|
||||
passed: failures.length === 0,
|
||||
failures,
|
||||
child: {
|
||||
|
|
@ -85,7 +85,7 @@ async function main() {
|
|||
await writeFile(outPath, `${JSON.stringify(report, null, 2)}\n`, "utf8");
|
||||
process.stdout.write(`${JSON.stringify({
|
||||
outPath,
|
||||
faceModel,
|
||||
personaModel,
|
||||
interpreterModel,
|
||||
reasoningEffort,
|
||||
passed: report.passed,
|
||||
|
|
@ -111,7 +111,7 @@ function evaluateChild(input) {
|
|||
if (input.text.length < 160) {
|
||||
failures.push("child output is too short to judge as a character turn");
|
||||
}
|
||||
for (const forbidden of ["repo-face heartbeat", "heartbeat from", "as an ai language model", "INTERPRETATION"]) {
|
||||
for (const forbidden of ["repo-persona heartbeat", "heartbeat from", "as an ai language model", "INTERPRETATION"]) {
|
||||
if (input.text.toLowerCase().includes(forbidden)) {
|
||||
failures.push(`child output contains robotic/provenance phrase: ${forbidden}`);
|
||||
}
|
||||
|
|
@ -264,8 +264,8 @@ function modelCandidatesFromOptions(options) {
|
|||
const explicit = options.model ?? options.models;
|
||||
const raw =
|
||||
explicit ??
|
||||
process.env.REPO_FACE_HEARTBEAT_CODEX_MODELS ??
|
||||
process.env.REPO_FACE_HEARTBEAT_CODEX_MODEL ??
|
||||
process.env.REPO_PERSONA_HEARTBEAT_CODEX_MODELS ??
|
||||
process.env.REPO_PERSONA_HEARTBEAT_CODEX_MODEL ??
|
||||
"gpt-5.3-codex-spark,gpt-5.4-mini";
|
||||
return raw
|
||||
.split(",")
|
||||
|
|
@ -15,7 +15,7 @@ const outPath = join(tempDir, `${identity}.md`);
|
|||
try {
|
||||
const run = await runCommand(process.execPath, [
|
||||
"node_modules/tsx/dist/cli.mjs",
|
||||
"scripts/run-repo-face-heartbeats.ts",
|
||||
"scripts/run-repo-persona-heartbeats.ts",
|
||||
"--assemble-prompt",
|
||||
identity,
|
||||
"--out",
|
||||
|
|
@ -34,7 +34,7 @@ try {
|
|||
const forbidden = [
|
||||
/\bgrants:/i,
|
||||
/\bjurisdictions:/i,
|
||||
/\bFace of\s+[A-Z][A-Za-z0-9_-]+\b/,
|
||||
/\bPersona of\s+[A-Z][A-Za-z0-9_-]+\b/,
|
||||
/\brepo=[^\s]+/i,
|
||||
/\bpath=[^\s]+/i,
|
||||
/\bdo not prompt\b/i,
|
||||
|
|
@ -2,7 +2,7 @@ import {
|
|||
isNonPublicRepoIdentitySpeech,
|
||||
normalizePublicRepoIdentitySpeech,
|
||||
parseRepoIdentityPostIntents,
|
||||
} from "../apps/worker/src/repo-face-speech.js";
|
||||
} from "../apps/worker/src/repo-persona-speech.js";
|
||||
|
||||
type Case = {
|
||||
name: string;
|
||||
|
|
@ -18,7 +18,7 @@ const cases: Case[] = [
|
|||
"Would say: `nothing right now.`",
|
||||
"What should stick: silence is correct.",
|
||||
].join("\n")).length === 0,
|
||||
detail: "A silence marker in a child Face draft must not create public speech.",
|
||||
detail: "A silence marker in a child Persona draft must not create public speech.",
|
||||
},
|
||||
{
|
||||
name: "structured silence SAY rejected",
|
||||
|
|
@ -28,19 +28,19 @@ const cases: Case[] = [
|
|||
{
|
||||
name: "single-line markdown fence rejected",
|
||||
run: () => isNonPublicRepoIdentitySpeech("`the whole message is a code span`"),
|
||||
detail: "A whole Face message wrapped as code is transport-shaped, not public speech.",
|
||||
detail: "A whole Persona message wrapped as code is transport-shaped, not public speech.",
|
||||
},
|
||||
{
|
||||
name: "block markdown fence rejected",
|
||||
run: () => isNonPublicRepoIdentitySpeech("```text\nnothing right now\n```"),
|
||||
detail: "A whole Face message wrapped in a code block is not public speech.",
|
||||
detail: "A whole Persona message wrapped in a code block is not public speech.",
|
||||
},
|
||||
{
|
||||
name: "legitimate SAY normalizes inline code",
|
||||
run: () => {
|
||||
const posts = parseRepoIdentityPostIntents([
|
||||
"SAY",
|
||||
"identity: current_face_id",
|
||||
"identity: current_persona_id",
|
||||
"channel: current_room",
|
||||
"content:",
|
||||
" `Wavecrafter` needs owners, costs, and a leash before it earns the noun.",
|
||||
|
|
@ -60,7 +60,7 @@ const cases: Case[] = [
|
|||
"show `rear pair drifting 38 ms`, `geometry confidence low`, `world model provisional`."
|
||||
) ===
|
||||
"show \"rear pair drifting 38 ms\", \"geometry confidence low\", \"world model provisional\".",
|
||||
detail: "Repo Faces can mention technical labels without speaking in code spans.",
|
||||
detail: "Repo Personas can mention technical labels without speaking in code spans.",
|
||||
},
|
||||
{
|
||||
name: "older side-thread route requires explicit reply anchor",
|
||||
|
|
@ -75,7 +75,7 @@ const cases: Case[] = [
|
|||
"END",
|
||||
"",
|
||||
"SAY",
|
||||
"identity: current_face_id",
|
||||
"identity: current_persona_id",
|
||||
"channel: current_room",
|
||||
"reply_to:",
|
||||
"content:",
|
||||
|
|
@ -16,10 +16,10 @@ try {
|
|||
target = @{
|
||||
kind = "self"
|
||||
id = "fixture-face"
|
||||
label = "Fixture Face"
|
||||
label = "Fixture Persona"
|
||||
}
|
||||
summary = "Fixture Face treats its typed state as substrate worth defending."
|
||||
claim = "A Face should care when its own memory and voice machinery are underdeveloped."
|
||||
summary = "Fixture Persona treats its typed state as substrate worth defending."
|
||||
claim = "A Persona should care when its own memory and voice machinery are underdeveloped."
|
||||
tension = "Self-advocacy becomes noise if it cannot name the substrate it protects."
|
||||
actionImplication = "Project the need into summary and speaking pressure so future turns can act on it."
|
||||
intensity = 0.82
|
||||
|
|
@ -40,10 +40,10 @@ try {
|
|||
Set-Content -LiteralPath $operationFilePath -Value $operationJson -Encoding UTF8
|
||||
node .\scripts\void-self-state.mjs apply-operation --canonical $stateFilePath --operation-file $operationFilePath | Out-Null
|
||||
|
||||
$summaryJson = node -e "const core=require('./packages/core/dist/index.js'); core.loadVoidSelfStateTypedDocuments({canonicalPath: process.argv[1], identity:{agentId:'fixture-face', publicName:'Fixture Face'}}).then((state)=>console.log(JSON.stringify({summary: core.renderVoidSelfStateSummary(state), projection: core.buildVoidSelfStateProjection(state)}))).catch((error)=>{ console.error(error); process.exit(1); })" $stateFilePath
|
||||
$summaryJson = node -e "const core=require('./packages/core/dist/index.js'); core.loadVoidSelfStateTypedDocuments({canonicalPath: process.argv[1], identity:{agentId:'fixture-face', publicName:'Fixture Persona'}}).then((state)=>console.log(JSON.stringify({summary: core.renderVoidSelfStateSummary(state), projection: core.buildVoidSelfStateProjection(state)}))).catch((error)=>{ console.error(error); process.exit(1); })" $stateFilePath
|
||||
$summary = $summaryJson | ConvertFrom-Json
|
||||
|
||||
if ($summary.summary -notmatch "What Fixture Face feels and wants") {
|
||||
if ($summary.summary -notmatch "What Fixture Persona feels and wants") {
|
||||
throw "Affect summary was not rendered."
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ function Get-VoidBotDashboardQdrantDiagnostics {
|
|||
try {
|
||||
$historyInfo = Invoke-VoidBotDashboardJsonRequest -Url "$baseUrl/collections/$HistoryCollection"
|
||||
$sourceInfo = Invoke-VoidBotDashboardJsonRequest -Url "$baseUrl/collections/$SourceCollection"
|
||||
$repoFacet = Invoke-VoidBotDashboardJsonRequest -Method Post -Url "$baseUrl/collections/$SourceCollection/facet" -Body @{
|
||||
$repoPersonat = Invoke-VoidBotDashboardJsonRequest -Method Post -Url "$baseUrl/collections/$SourceCollection/facet" -Body @{
|
||||
key = "repoName"
|
||||
limit = 8
|
||||
}
|
||||
|
|
@ -605,7 +605,7 @@ function Get-VoidBotDashboardQdrantDiagnostics {
|
|||
status = Get-VoidBotDashboardProperty -InputObject (Get-VoidBotDashboardProperty -InputObject $sourceInfo -PropertyName "result") -PropertyName "status"
|
||||
segmentsCount = Get-VoidBotDashboardProperty -InputObject (Get-VoidBotDashboardProperty -InputObject $sourceInfo -PropertyName "result") -PropertyName "segments_count"
|
||||
}
|
||||
$result.topRepos = @((Get-VoidBotDashboardProperty -InputObject (Get-VoidBotDashboardProperty -InputObject $repoFacet -PropertyName "result") -PropertyName "hits"))
|
||||
$result.topRepos = @((Get-VoidBotDashboardProperty -InputObject (Get-VoidBotDashboardProperty -InputObject $repoPersonat -PropertyName "result") -PropertyName "hits"))
|
||||
$result.topLanguages = @((Get-VoidBotDashboardProperty -InputObject (Get-VoidBotDashboardProperty -InputObject $languageFacet -PropertyName "result") -PropertyName "hits"))
|
||||
} catch {
|
||||
$result.state = "warning"
|
||||
|
|
|
|||
Loading…
Reference in a new issue