From 08dea087911d8e9d8e751e8e881343e452e13dbf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 12 Jun 2026 18:19:07 +0100 Subject: [PATCH] Add Brokkr repo Persona state --- .voidbot/state/README.md | 14 +++++ .voidbot/state/brokkr.cc | Bin 0 -> 4647 bytes .voidbot/voice/identity.json | 23 +++++++ tools/persona-remember.ps1 | 114 +++++++++++++++++++++++++++++++++++ tools/persona-state-read.ps1 | 44 ++++++++++++++ 5 files changed, 195 insertions(+) create mode 100644 .voidbot/state/README.md create mode 100644 .voidbot/state/brokkr.cc create mode 100644 .voidbot/voice/identity.json create mode 100644 tools/persona-remember.ps1 create mode 100644 tools/persona-state-read.ps1 diff --git a/.voidbot/state/README.md b/.voidbot/state/README.md new file mode 100644 index 0000000..708892e --- /dev/null +++ b/.voidbot/state/README.md @@ -0,0 +1,14 @@ +# Brokkr Persona State + +`brokkr.cc` is Brokkr's repo-local persistent Persona state. + +Do not hand-edit the `.cc` file. Use the repo-local tools: + +```powershell +.\tools\persona-state-read.ps1 +.\tools\persona-remember.ps1 -Summary "..." -Claim "..." -ActionImplication "..." +``` + +The tools call VoidBot's typed self-state service so the same document schema used by registered repo Faces owns mutation and reads. + +VoidBot automatic indexing requires Brokkr to be registered as a repo Face identity in VoidBot. Until then, this file is local typed state and can still be read or mutated by the tools here. diff --git a/.voidbot/state/brokkr.cc b/.voidbot/state/brokkr.cc new file mode 100644 index 0000000000000000000000000000000000000000..b9e01d5f90051eb172d8970b713559cad395561a GIT binary patch literal 4647 zcmb`L%WfOV6^1iFHhGDlHpwCpNl~IGN(K^Gk|)q&97nQep$$>&J|sKp?&_(krovfi zBF`X;EaU{aAj`3>n=i2)V_*zs6?j&80_7C~ z4W*9A%!x49vKN!vW?dreY(FJq_-3Gzgq_zE5aNm}{O#6=8tm1*O>CiljT0c?25w6$ z61htvMzE@=;cO~4B1%n$m2NLKg0ow#;+QYgpJqB5NlUktCG+6?d6A}s5~at^971fx zt<}aIzoBXPC5<}QQ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JJ|)je3E+zJn85|jaOBI(!wBs-$)%qZT;iiyWT6m=v*x->%d>Lf3@)+C zWiEM>v$^!5;8G#oK!j`5=?r}}S5`hxb|8{-GAa4|^oKg*`^C`rof@OBSpZgexU4$4 zMp^86ZHR)-G1aXpk@n}pZwO45fSSqJ8w&u@@=mJ93e>gkgq)00P=?iHInKPU#6C$T_MQT2qp~*0q-axlxEmdQipij3}vYH za0&X270nz6uz*Ohmk;9v^&U8SoL+~Eq7q2PHcXs{ { + await core.ensureVoidSelfStateIdentityProfile({ + canonicalPath: statePath, + identity: { + agentId: identity.id, + publicName: identity.displayName, + publicDescription: identity.description + } + }); + const result = await core.applyVoidSelfStateOperation({ + canonicalPath: statePath, + identity: { + agentId: identity.id, + publicName: identity.displayName, + publicDescription: identity.description + } + }, operation); + console.log(JSON.stringify({ ok: true, memoryId: operation.memory.memoryId, result }, null, 2)); +})().catch((error) => { + console.error(error); + process.exit(1); +}); +"@ $coreDistPath $identityPath $resolvedStatePath $operationJsonBase64 + +if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE +} diff --git a/tools/persona-state-read.ps1 b/tools/persona-state-read.ps1 new file mode 100644 index 0000000..abc7551 --- /dev/null +++ b/tools/persona-state-read.ps1 @@ -0,0 +1,44 @@ +param( + [string]$StatePath = ".\.voidbot\state\brokkr.cc", + [switch]$Json +) + +$ErrorActionPreference = "Stop" + +$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..") +$voidBotRoot = "E:\Projects\VoidBot" +$coreDistPath = Join-Path $voidBotRoot "packages\core\dist\index.js" +$identityPath = Join-Path $repoRoot ".voidbot\voice\identity.json" +$resolvedStatePath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath((Join-Path $repoRoot $StatePath)) + +if (!(Test-Path $coreDistPath)) { + throw "Missing VoidBot built core at $coreDistPath. Build VoidBot before reading Persona state." +} + +node -e @" +const core = require(process.argv[1]); +const fs = require('fs'); +const identity = JSON.parse(fs.readFileSync(process.argv[2], 'utf8')); +const statePath = process.argv[3]; +core.loadVoidSelfStateTypedDocuments({ + canonicalPath: statePath, + identity: { + agentId: identity.id, + publicName: identity.displayName, + publicDescription: identity.description + } +}).then((state) => { + if (process.argv[4] === '--json') { + console.log(JSON.stringify(state, null, 2)); + return; + } + console.log(core.renderVoidSelfStateSummary(state)); +}).catch((error) => { + console.error(error); + process.exit(1); +}); +"@ $coreDistPath $identityPath $resolvedStatePath $(if ($Json) { "--json" } else { "" }) + +if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE +}