Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23719455cf | ||
|
|
dac5c93d14 | ||
|
|
1401fbe167 | ||
|
|
18e1461017 | ||
|
|
1d6664e635 |
7 changed files with 393 additions and 185 deletions
95
AGENTS.md
95
AGENTS.md
|
|
@ -1,84 +1,30 @@
|
||||||
Use the `voidbot` MCP server whenever the task touches Discord history, archived GameCult discussion, indexed GameCult repositories, Aetheria lore, or owner notifications.
|
# RETIRED & FROZEN
|
||||||
|
|
||||||
|
**VoidBot was retired on `2026-10-22` and is FROZEN pending full retirement** (`eureka-body:follow_up:voidbot-retirement`, `void-body:ruling:stewardship-and-voidbot-teardown-2026-12-03`).
|
||||||
|
|
||||||
|
- **HARD RULE — ZERO DISCORD TAINT (`gamecult-chat:ruling:discord-taints-training`):** **Never read archived Discord through VoidBot.** Do not invoke `search_history` or `get_message_context`, and do not inspect `.voidbot/rag/messages.json`, `.voidbot/history-vector-store.json`, or any archived Discord DBs or exports.
|
||||||
|
- **FROZEN SUBSTRATE:** Do not run the retired Discord bot, worker job loop, Persona/repo-Face swarm, or `npm run state:status`. Do not add new features or state mutations here.
|
||||||
|
- **FAIL-CLOSED MCP SURFACE:** When `VOIDBOT_MCP_TOOL_ALLOWLIST` is unset or empty, `apps/worker/src/mcp-server-tools.ts` defaults exclusively to the non-Discord read-only source-retrieval tools (`list_indexed_repos`, `search_sources`, `get_source_context`, `get_exact_source_document`).
|
||||||
|
|
||||||
Commit completed work at the end of each pass unless the user explicitly asks to leave changes uncommitted or the work is clearly mid-surgery. Prefer small, intentional commits over letting a pile of unrelated edits rot in the worktree.
|
Commit completed work at the end of each pass unless the user explicitly asks to leave changes uncommitted or the work is clearly mid-surgery. Prefer small, intentional commits over letting a pile of unrelated edits rot in the worktree.
|
||||||
|
|
||||||
## Canonical Project State
|
## Canonical Project State (Frozen)
|
||||||
|
|
||||||
- Treat `state/map.yaml` as the canonical slow-changing project map.
|
- `state/map.yaml` records the historical project map with `status: frozen`.
|
||||||
- Treat `state/scratch.md` as disposable working memory for one bounded subgoal.
|
- `state/scratch.md`, `state/evidence.jsonl`, `notes/fresh-workspace-handoff.md`, `notes/voidbot-current-system-map.md`, and `notes/voidbot-implementation-plan.md` are retained as frozen historical artifacts pending full retirement.
|
||||||
- Treat `state/evidence.jsonl` as the distilled durable ledger of what changed future belief.
|
|
||||||
- Treat `notes/fresh-workspace-handoff.md` as the compact re-entry packet.
|
|
||||||
- Treat `notes/voidbot-current-system-map.md` as the source-grounded explanation of the live control flow.
|
|
||||||
- Treat `notes/voidbot-implementation-plan.md` as the current larger-organ sequence.
|
|
||||||
- Update `state/map.yaml` when project understanding changes.
|
|
||||||
- Add evidence after meaningful research, implementation, verification, or rejected paths, but keep it distilled. Routine “I just did this” proof belongs in git history, commits, smoke artifacts, or targeted logs unless it changes what the next session should believe.
|
|
||||||
|
|
||||||
## Important Paths
|
## Important Paths
|
||||||
|
|
||||||
- Project root: `E:\Projects\VoidBot`
|
- Project root: `F:\Projects\VoidBot`
|
||||||
- Canonical map: `E:\Projects\VoidBot\state\map.yaml`
|
- Canonical map: `F:\Projects\VoidBot\state\map.yaml`
|
||||||
- Scratch surface: `E:\Projects\VoidBot\state\scratch.md`
|
- Scratch surface: `F:\Projects\VoidBot\state\scratch.md`
|
||||||
- Distilled evidence ledger: `E:\Projects\VoidBot\state\evidence.jsonl`
|
- Distilled evidence ledger: `F:\Projects\VoidBot\state\evidence.jsonl`
|
||||||
- Branch ledger: `E:\Projects\VoidBot\state\branches.json`
|
- Branch ledger: `F:\Projects\VoidBot\state\branches.json`
|
||||||
- Handoff summary: `E:\Projects\VoidBot\notes\fresh-workspace-handoff.md`
|
- Handoff summary: `F:\Projects\VoidBot\notes\fresh-workspace-handoff.md`
|
||||||
- System map: `E:\Projects\VoidBot\notes\voidbot-current-system-map.md`
|
- System map: `F:\Projects\VoidBot\notes\voidbot-current-system-map.md`
|
||||||
- Implementation plan: `E:\Projects\VoidBot\notes\voidbot-implementation-plan.md`
|
- Implementation plan: `F:\Projects\VoidBot\notes\voidbot-implementation-plan.md`
|
||||||
- State CLI: `E:\Projects\VoidBot\tools\voidbot_state.ts`
|
- State CLI (frozen): `F:\Projects\VoidBot\tools\voidbot_state.ts`
|
||||||
- Pre-compaction helper: `E:\Projects\VoidBot\tools\voidbot_prepare_compaction.ts`
|
- Pre-compaction helper (frozen): `F:\Projects\VoidBot\tools\voidbot_prepare_compaction.ts`
|
||||||
|
|
||||||
## Useful Commands
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
npm run state:status
|
|
||||||
npx tsx .\tools\voidbot_state.ts add-evidence --type research --status ok --note "..."
|
|
||||||
npx tsx .\tools\voidbot_state.ts add-branch --id branch-id --hypothesis "..."
|
|
||||||
npm run state:prepare-compaction
|
|
||||||
```
|
|
||||||
|
|
||||||
## Session Bootstrap And Re-entry Protocol
|
|
||||||
|
|
||||||
On fresh session load, do this before wandering into implementation:
|
|
||||||
|
|
||||||
1. read:
|
|
||||||
- `state/map.yaml`
|
|
||||||
- `notes/fresh-workspace-handoff.md`
|
|
||||||
- `notes/voidbot-current-system-map.md`
|
|
||||||
- `notes/voidbot-implementation-plan.md`
|
|
||||||
2. run:
|
|
||||||
- `npm run state:status`
|
|
||||||
3. restate the current next action from the persisted state before starting edits
|
|
||||||
|
|
||||||
After compaction, resume, or suspicious continuity loss:
|
|
||||||
|
|
||||||
1. rerun `npm run state:status`
|
|
||||||
2. reread `state/map.yaml` and `notes/fresh-workspace-handoff.md`
|
|
||||||
3. treat the persisted next action as authoritative unless fresh repo evidence contradicts it
|
|
||||||
|
|
||||||
When context pressure is clearly rising:
|
|
||||||
|
|
||||||
1. stop broad exploration
|
|
||||||
2. narrow the active move to one bounded organ
|
|
||||||
3. persist map or handoff updates, plus distilled evidence only when the lesson changes future belief, before the blackout lands
|
|
||||||
|
|
||||||
When the user says to prepare for imminent compaction:
|
|
||||||
|
|
||||||
1. run `npm run state:prepare-compaction` before editing persistence surfaces
|
|
||||||
2. use its warnings as the checklist for map, handoff, scratch, evidence, and git hygiene
|
|
||||||
3. update only the state that actually needs to change
|
|
||||||
4. rerun `npm run state:prepare-compaction` after edits
|
|
||||||
5. fix errors, address warnings, and commit the completed persistence pass unless the work is deliberately mid-surgery
|
|
||||||
|
|
||||||
Prefer these tools over raw file inspection when they can answer the question:
|
|
||||||
- `list_indexed_repos` to discover valid indexed repository names before narrowing a source search
|
|
||||||
- `search_history` for semantic retrieval across archived Discord messages
|
|
||||||
- `get_message_context` for the surrounding conversation window around a message
|
|
||||||
- `search_sources` for semantic retrieval across indexed source trees and lore repositories
|
|
||||||
- `get_source_context` for the surrounding chunk window inside an indexed source document
|
|
||||||
- `notify_owner` for explicit Discord pings or long-running completion notices
|
|
||||||
|
|
||||||
When searching GameCult repos or lore, start with `voidbot` retrieval instead of `rg --files` plus file-by-file reads unless you need exact edit targets or the indexed results are clearly insufficient.
|
|
||||||
|
|
||||||
Do not inspect `.voidbot/rag/messages.json`, `.voidbot/rag/source-documents.json`, `.voidbot/history-vector-store.json`, or `.voidbot/source-vectors/` directly unless the MCP tools are unavailable or clearly insufficient.
|
|
||||||
|
|
||||||
## Operating Discipline
|
## Operating Discipline
|
||||||
|
|
||||||
|
|
@ -88,4 +34,3 @@ Do not inspect `.voidbot/rag/messages.json`, `.voidbot/rag/source-documents.json
|
||||||
- Revert or discard changes that do not clearly improve the target.
|
- Revert or discard changes that do not clearly improve the target.
|
||||||
- If the diff grows while understanding shrinks, stop implementation and switch to diagnosis.
|
- If the diff grows while understanding shrinks, stop implementation and switch to diagnosis.
|
||||||
- Keep maps and prose together; do not replace useful maps with prose-only explanations.
|
- Keep maps and prose together; do not replace useful maps with prose-only explanations.
|
||||||
- Before handoff, compaction, or phase boundaries, sync `state/map.yaml`, add distilled evidence when the lesson changes future belief, refresh `notes/fresh-workspace-handoff.md`, and make the next action explicit.
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
# RETIRED & FROZEN
|
||||||
|
|
||||||
|
**VoidBot was retired on `2026-10-22` and is frozen pending full retirement** (`eureka-body:follow_up:voidbot-retirement`, `void-body:ruling:stewardship-and-voidbot-teardown-2026-12-03`).
|
||||||
|
**Never read archived Discord through VoidBot (`gamecult-chat:ruling:discord-taints-training`).**
|
||||||
|
|
||||||
Repository doctrine for this project lives in AGENTS.md, shared with Codex.
|
Repository doctrine for this project lives in AGENTS.md, shared with Codex.
|
||||||
|
|
||||||
@AGENTS.md
|
@AGENTS.md
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||||
|
|
||||||
import { DEFAULT_RETRIEVAL_RESULT_LIMIT } from "@voidbot/shared";
|
import { DEFAULT_RETRIEVAL_RESULT_LIMIT } from "@voidbot/shared";
|
||||||
import { searchHistoryWithArchiveFallback } from "@voidbot/rag";
|
|
||||||
|
|
||||||
import { type VoidbotMcpContext } from "./mcp-server-context";
|
import { type VoidbotMcpContext } from "./mcp-server-context";
|
||||||
import {
|
import {
|
||||||
formatArchivedMessage,
|
|
||||||
formatHistoryResults,
|
|
||||||
formatSourceResults,
|
formatSourceResults,
|
||||||
getRequiredVariable,
|
getRequiredVariable,
|
||||||
jsonResource,
|
jsonResource,
|
||||||
|
|
@ -41,11 +38,13 @@ export function registerVoidbotResources(
|
||||||
{
|
{
|
||||||
title: "Retrieval Guide",
|
title: "Retrieval Guide",
|
||||||
description:
|
description:
|
||||||
"Quick guide to the available semantic-search resource templates for history, source, and lore retrieval.",
|
"Quick guide to the available semantic-search resource templates for source and lore retrieval (archived Discord history is disabled).",
|
||||||
mimeType: "application/json",
|
mimeType: "application/json",
|
||||||
},
|
},
|
||||||
async (uri) =>
|
async (uri) =>
|
||||||
jsonResource(uri, {
|
jsonResource(uri, {
|
||||||
|
notice:
|
||||||
|
"Archived Discord history resources and reads are disabled per gamecult-chat:ruling:discord-taints-training.",
|
||||||
resources: [
|
resources: [
|
||||||
{
|
{
|
||||||
uri: "voidbot://repos/indexed",
|
uri: "voidbot://repos/indexed",
|
||||||
|
|
@ -53,14 +52,6 @@ export function registerVoidbotResources(
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
templates: [
|
templates: [
|
||||||
{
|
|
||||||
uriTemplate: "voidbot://history/search/{query}",
|
|
||||||
purpose: "Semantic search across archived Discord history.",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
uriTemplate: "voidbot://history/context/{messageId}",
|
|
||||||
purpose: "Fetch a surrounding conversation window around one archived message.",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
uriTemplate: "voidbot://sources/search/{query}",
|
uriTemplate: "voidbot://sources/search/{query}",
|
||||||
purpose: "Semantic search across all indexed source trees and lore repositories.",
|
purpose: "Semantic search across all indexed source trees and lore repositories.",
|
||||||
|
|
@ -77,64 +68,6 @@ export function registerVoidbotResources(
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
server.registerResource(
|
|
||||||
"history_search",
|
|
||||||
new ResourceTemplate("voidbot://history/search/{query}", { list: undefined }),
|
|
||||||
{
|
|
||||||
title: "History Search",
|
|
||||||
description:
|
|
||||||
"Semantic search across archived Discord history.",
|
|
||||||
mimeType: "application/json",
|
|
||||||
},
|
|
||||||
async (uri, variables) => {
|
|
||||||
const query = getRequiredVariable(variables, "query", "history search");
|
|
||||||
const results = await searchHistoryWithArchiveFallback({
|
|
||||||
retrievalService: context.retrievalService,
|
|
||||||
archiveRepository: context.archiveRepository,
|
|
||||||
query,
|
|
||||||
limit: DEFAULT_RETRIEVAL_RESULT_LIMIT,
|
|
||||||
});
|
|
||||||
|
|
||||||
return jsonResource(uri, {
|
|
||||||
query,
|
|
||||||
resultCount: results.length,
|
|
||||||
results: formatHistoryResults(results),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
server.registerResource(
|
|
||||||
"history_context",
|
|
||||||
new ResourceTemplate("voidbot://history/context/{messageId}", { list: undefined }),
|
|
||||||
{
|
|
||||||
title: "History Context",
|
|
||||||
description:
|
|
||||||
"Fetch the surrounding conversation window for one archived Discord message ID.",
|
|
||||||
mimeType: "application/json",
|
|
||||||
},
|
|
||||||
async (uri, variables) => {
|
|
||||||
const messageId = getRequiredVariable(variables, "messageId", "history context");
|
|
||||||
const anchor = await context.archiveRepository.get(messageId);
|
|
||||||
|
|
||||||
if (!anchor) {
|
|
||||||
return jsonResource(uri, {
|
|
||||||
found: false,
|
|
||||||
messageId,
|
|
||||||
messages: [],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const messages = await context.archiveRepository.listContextWindow(messageId, 2, 2);
|
|
||||||
|
|
||||||
return jsonResource(uri, {
|
|
||||||
found: true,
|
|
||||||
messageId,
|
|
||||||
count: messages.length,
|
|
||||||
messages: messages.map((message) => formatArchivedMessage(message, messageId)),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
server.registerResource(
|
server.registerResource(
|
||||||
"source_search",
|
"source_search",
|
||||||
new ResourceTemplate("voidbot://sources/search/{query}", { list: undefined }),
|
new ResourceTemplate("voidbot://sources/search/{query}", { list: undefined }),
|
||||||
|
|
|
||||||
|
|
@ -82,28 +82,53 @@ const READ_ONLY_ANNOTATIONS = {
|
||||||
const DEFAULT_ODIN_STORE_PATH = path.resolve(process.cwd(), "..", "Odin", "scratch", "odin", "odin.ccmp");
|
const DEFAULT_ODIN_STORE_PATH = path.resolve(process.cwd(), "..", "Odin", "scratch", "odin", "odin.ccmp");
|
||||||
const ODIN_SURFACE_KEY = "surface:gamecult.network.status";
|
const ODIN_SURFACE_KEY = "surface:gamecult.network.status";
|
||||||
|
|
||||||
function isMcpToolAllowed(name: string): boolean {
|
export const DEFAULT_MCP_TOOL_ALLOWLIST: ReadonlySet<string> = new Set([
|
||||||
const raw = process.env.VOIDBOT_MCP_TOOL_ALLOWLIST?.trim();
|
"list_indexed_repos",
|
||||||
if (!raw) {
|
"search_sources",
|
||||||
return true;
|
"get_source_context",
|
||||||
}
|
"get_exact_source_document",
|
||||||
|
]);
|
||||||
|
|
||||||
const allowed = new Set(
|
export const DISCORD_HISTORY_TOOL_NAMES: ReadonlySet<string> = new Set([
|
||||||
|
"search_history",
|
||||||
|
"get_message_context",
|
||||||
|
]);
|
||||||
|
|
||||||
|
export function resolveMcpToolAllowlist(
|
||||||
|
rawAllowlist: string | undefined = process.env.VOIDBOT_MCP_TOOL_ALLOWLIST,
|
||||||
|
allowDiscordHistory: boolean = process.env.VOIDBOT_ALLOW_DISCORD_HISTORY === "1",
|
||||||
|
): ReadonlySet<string> {
|
||||||
|
const raw = rawAllowlist?.trim();
|
||||||
|
const candidates = raw
|
||||||
|
? new Set(
|
||||||
raw
|
raw
|
||||||
.split(",")
|
.split(",")
|
||||||
.map((entry) => entry.trim())
|
.map((entry) => entry.trim())
|
||||||
.filter(Boolean),
|
.filter(Boolean),
|
||||||
);
|
)
|
||||||
return allowed.has(name);
|
: DEFAULT_MCP_TOOL_ALLOWLIST;
|
||||||
|
|
||||||
|
if (allowDiscordHistory) {
|
||||||
|
return candidates;
|
||||||
|
}
|
||||||
|
|
||||||
|
const filtered = new Set<string>();
|
||||||
|
for (const tool of candidates) {
|
||||||
|
if (!DISCORD_HISTORY_TOOL_NAMES.has(tool)) {
|
||||||
|
filtered.add(tool);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function registerVoidbotTools(
|
export function registerVoidbotTools(
|
||||||
server: McpServer,
|
server: McpServer,
|
||||||
context: VoidbotMcpContext,
|
context: VoidbotMcpContext,
|
||||||
): void {
|
): void {
|
||||||
|
const allowedTools = resolveMcpToolAllowlist();
|
||||||
const registerIfAllowed = (...args: any[]): void => {
|
const registerIfAllowed = (...args: any[]): void => {
|
||||||
const [name] = args;
|
const [name] = args;
|
||||||
if (!isMcpToolAllowed(name)) {
|
if (!allowedTools.has(name)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(server.registerTool as any)(...args);
|
(server.registerTool as any)(...args);
|
||||||
|
|
|
||||||
|
|
@ -552,8 +552,6 @@ function restrictMcpServersToRepoFaceExploration(
|
||||||
role?: string,
|
role?: string,
|
||||||
): NonNullable<OwnerCodexProviderOptions["mcpServers"]> {
|
): NonNullable<OwnerCodexProviderOptions["mcpServers"]> {
|
||||||
const allowedTools = [
|
const allowedTools = [
|
||||||
"search_history",
|
|
||||||
"get_message_context",
|
|
||||||
"list_indexed_repos",
|
"list_indexed_repos",
|
||||||
"search_sources",
|
"search_sources",
|
||||||
"get_source_context",
|
"get_source_context",
|
||||||
|
|
|
||||||
307
scripts/test-mcp-tool-allowlist.ts
Normal file
307
scripts/test-mcp-tool-allowlist.ts
Normal file
|
|
@ -0,0 +1,307 @@
|
||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { mkdtemp, rm } from "node:fs/promises";
|
||||||
|
import { tmpdir } from "node:os";
|
||||||
|
import { join } from "node:path";
|
||||||
|
|
||||||
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
||||||
|
import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
|
||||||
|
import {
|
||||||
|
FileSourceDocumentArchiveRepository,
|
||||||
|
SourceDocumentIngester,
|
||||||
|
} from "@voidbot/rag";
|
||||||
|
|
||||||
|
import { type VoidbotMcpContext } from "../apps/worker/src/mcp-server-context";
|
||||||
|
import { createVoidbotMcpServer } from "../apps/worker/src/mcp-server-factory";
|
||||||
|
import { DEFAULT_MCP_TOOL_ALLOWLIST } from "../apps/worker/src/mcp-server-tools";
|
||||||
|
|
||||||
|
const EXPECTED_DEFAULT_TOOLS = [
|
||||||
|
"get_exact_source_document",
|
||||||
|
"get_source_context",
|
||||||
|
"list_indexed_repos",
|
||||||
|
"search_sources",
|
||||||
|
].sort();
|
||||||
|
|
||||||
|
const BLOCKED_TOOL_CALLS: Array<{ name: string; arguments: Record<string, unknown> }> = [
|
||||||
|
{
|
||||||
|
name: "post_discord_message",
|
||||||
|
arguments: { channelId: "123", content: "should be refused" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "post_repo_identity_message",
|
||||||
|
arguments: { identity: "nibu", channelId: "123", content: "should be refused" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "notify_owner",
|
||||||
|
arguments: { message: "should be refused" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "apply_repo_face_state_operation",
|
||||||
|
arguments: { identity: "nibu", operation: { type: "noop" } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "create_shared_document",
|
||||||
|
arguments: { documentId: "doc", title: "Doc", body: "Body" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "update_shared_document",
|
||||||
|
arguments: { documentId: "doc", title: "Doc", body: "Body", expectedVersion: 1 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "invoke_odin_interface_command",
|
||||||
|
arguments: { providerId: "voidbot.swarm", command: "set_heat" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "search_history",
|
||||||
|
arguments: { query: "discord taint check" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "get_message_context",
|
||||||
|
arguments: { messageId: "999" },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
async function withConnectedClient(
|
||||||
|
context: VoidbotMcpContext,
|
||||||
|
run: (client: Client) => Promise<void>,
|
||||||
|
): Promise<void> {
|
||||||
|
const server = createVoidbotMcpServer(context);
|
||||||
|
const client = new Client({ name: "mcp-allowlist-test", version: "1.0.0" });
|
||||||
|
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
||||||
|
await Promise.all([server.connect(serverTransport), client.connect(clientTransport)]);
|
||||||
|
try {
|
||||||
|
await run(client);
|
||||||
|
} finally {
|
||||||
|
await client.close();
|
||||||
|
await server.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function assertToolRefused(
|
||||||
|
client: Client,
|
||||||
|
toolCall: { name: string; arguments: Record<string, unknown> },
|
||||||
|
): Promise<void> {
|
||||||
|
let outcome: "threw" | "error_result" | "succeeded" = "succeeded";
|
||||||
|
try {
|
||||||
|
const result = await client.callTool(toolCall);
|
||||||
|
if (result.isError) {
|
||||||
|
outcome = "error_result";
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
outcome = "threw";
|
||||||
|
}
|
||||||
|
assert.notEqual(
|
||||||
|
outcome,
|
||||||
|
"succeeded",
|
||||||
|
`Expected unallowed MCP tool "${toolCall.name}" to be refused, but callTool succeeded.`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function assertNoDiscordHistoryResources(
|
||||||
|
client: Client,
|
||||||
|
label: string,
|
||||||
|
): Promise<void> {
|
||||||
|
const templates = await client.listResourceTemplates();
|
||||||
|
const uris = templates.resourceTemplates.map((template) => template.uriTemplate);
|
||||||
|
const historyTemplates = uris.filter((uri) => uri.startsWith("voidbot://history/"));
|
||||||
|
assert.deepEqual(
|
||||||
|
historyTemplates,
|
||||||
|
[],
|
||||||
|
`[${label}] Expected zero voidbot://history/* resource templates, got: ${historyTemplates.join(", ")}`,
|
||||||
|
);
|
||||||
|
|
||||||
|
await assert.rejects(
|
||||||
|
() => client.readResource({ uri: "voidbot://history/context/synthetic-msg-1" }),
|
||||||
|
(error) => error instanceof Error,
|
||||||
|
`[${label}] Expected voidbot://history/context/synthetic-msg-1 readResource to fail`,
|
||||||
|
);
|
||||||
|
|
||||||
|
const guide = await client.readResource({ uri: "voidbot://retrieval/guide" });
|
||||||
|
const guideText = guide.contents
|
||||||
|
.map((entry) => ("text" in entry && typeof entry.text === "string" ? entry.text : ""))
|
||||||
|
.join("\n");
|
||||||
|
assert.ok(
|
||||||
|
!guideText.includes("voidbot://history/"),
|
||||||
|
`[${label}] Expected voidbot://retrieval/guide not to advertise voidbot://history/* templates`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function assertDefaultFailClosedBehavior(
|
||||||
|
context: VoidbotMcpContext,
|
||||||
|
label: string,
|
||||||
|
): Promise<void> {
|
||||||
|
await withConnectedClient(context, async (client) => {
|
||||||
|
const listed = await client.listTools();
|
||||||
|
const names = listed.tools.map((tool) => tool.name).sort();
|
||||||
|
assert.deepEqual(
|
||||||
|
names,
|
||||||
|
EXPECTED_DEFAULT_TOOLS,
|
||||||
|
`[${label}] Expected only non-Discord read-only source tools, got: ${names.join(", ")}`,
|
||||||
|
);
|
||||||
|
|
||||||
|
const exact = await client.callTool({
|
||||||
|
name: "get_exact_source_document",
|
||||||
|
arguments: { sourceId: "ExampleRepo:README.md" },
|
||||||
|
});
|
||||||
|
assert.equal(exact.isError, undefined, `[${label}] Allowed source tool should succeed`);
|
||||||
|
assert.equal(
|
||||||
|
(exact.structuredContent as Record<string, unknown> | undefined)?.content,
|
||||||
|
"Read-only source witness.",
|
||||||
|
);
|
||||||
|
|
||||||
|
for (const blocked of BLOCKED_TOOL_CALLS) {
|
||||||
|
await assertToolRefused(client, blocked);
|
||||||
|
}
|
||||||
|
|
||||||
|
await assertNoDiscordHistoryResources(client, label);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main(): Promise<void> {
|
||||||
|
const originalAllowlist = process.env.VOIDBOT_MCP_TOOL_ALLOWLIST;
|
||||||
|
const originalAllowDiscordHistory = process.env.VOIDBOT_ALLOW_DISCORD_HISTORY;
|
||||||
|
const root = await mkdtemp(join(tmpdir(), "voidbot-mcp-allowlist-test-"));
|
||||||
|
|
||||||
|
try {
|
||||||
|
assert.deepEqual(
|
||||||
|
[...DEFAULT_MCP_TOOL_ALLOWLIST].sort(),
|
||||||
|
EXPECTED_DEFAULT_TOOLS,
|
||||||
|
"DEFAULT_MCP_TOOL_ALLOWLIST must match expected non-Discord read-only source tools",
|
||||||
|
);
|
||||||
|
|
||||||
|
const sources = new FileSourceDocumentArchiveRepository(join(root, "sources.json"));
|
||||||
|
await sources.syncRepoDocuments("ExampleRepo", [
|
||||||
|
{
|
||||||
|
id: "ExampleRepo:README.md",
|
||||||
|
repoName: "ExampleRepo",
|
||||||
|
path: "README.md",
|
||||||
|
content: "Read-only source witness.",
|
||||||
|
language: "markdown",
|
||||||
|
title: "Example README",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const context = {
|
||||||
|
sourceArchiveRepository: sources,
|
||||||
|
sourceDocumentIngester: new SourceDocumentIngester(),
|
||||||
|
} as VoidbotMcpContext;
|
||||||
|
|
||||||
|
delete process.env.VOIDBOT_ALLOW_DISCORD_HISTORY;
|
||||||
|
delete process.env.VOIDBOT_MCP_TOOL_ALLOWLIST;
|
||||||
|
await assertDefaultFailClosedBehavior(context, "unset");
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = "";
|
||||||
|
await assertDefaultFailClosedBehavior(context, "empty");
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = " ";
|
||||||
|
await assertDefaultFailClosedBehavior(context, "whitespace");
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = ",";
|
||||||
|
await withConnectedClient(context, async (client) => {
|
||||||
|
assert.equal(
|
||||||
|
client.getServerCapabilities()?.tools,
|
||||||
|
undefined,
|
||||||
|
"[comma-only] Expected no tools capability to be advertised",
|
||||||
|
);
|
||||||
|
await assert.rejects(
|
||||||
|
() => client.listTools(),
|
||||||
|
/Method not found|-32601/,
|
||||||
|
"[comma-only] Expected listTools to fail closed when zero tools are registered",
|
||||||
|
);
|
||||||
|
await assertToolRefused(client, {
|
||||||
|
name: "get_exact_source_document",
|
||||||
|
arguments: { sourceId: "ExampleRepo:README.md" },
|
||||||
|
});
|
||||||
|
await assertNoDiscordHistoryResources(client, "comma-only");
|
||||||
|
});
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = "list_indexed_repos,get_exact_source_document";
|
||||||
|
await withConnectedClient(context, async (client) => {
|
||||||
|
const listed = await client.listTools();
|
||||||
|
assert.deepEqual(
|
||||||
|
listed.tools.map((tool) => tool.name).sort(),
|
||||||
|
["get_exact_source_document", "list_indexed_repos"],
|
||||||
|
"[explicit] Expected only explicitly allowlisted tools",
|
||||||
|
);
|
||||||
|
await assertToolRefused(client, {
|
||||||
|
name: "search_sources",
|
||||||
|
arguments: { query: "witness" },
|
||||||
|
});
|
||||||
|
await assertNoDiscordHistoryResources(client, "explicit");
|
||||||
|
});
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = "search_history,get_message_context";
|
||||||
|
delete process.env.VOIDBOT_ALLOW_DISCORD_HISTORY;
|
||||||
|
await withConnectedClient(context, async (client) => {
|
||||||
|
assert.equal(
|
||||||
|
client.getServerCapabilities()?.tools,
|
||||||
|
undefined,
|
||||||
|
"[discord-allowlist-without-opt-in] Expected zero tools capability without VOIDBOT_ALLOW_DISCORD_HISTORY=1",
|
||||||
|
);
|
||||||
|
await assert.rejects(
|
||||||
|
() => client.listTools(),
|
||||||
|
/Method not found|-32601/,
|
||||||
|
"[discord-allowlist-without-opt-in] Expected listTools to fail closed with zero tools",
|
||||||
|
);
|
||||||
|
await assertToolRefused(client, { name: "search_history", arguments: { query: "test" } });
|
||||||
|
await assertToolRefused(client, { name: "get_message_context", arguments: { messageId: "1" } });
|
||||||
|
});
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST =
|
||||||
|
"search_history,get_message_context,list_indexed_repos";
|
||||||
|
process.env.VOIDBOT_ALLOW_DISCORD_HISTORY = "0";
|
||||||
|
await withConnectedClient(context, async (client) => {
|
||||||
|
const listed = await client.listTools();
|
||||||
|
assert.deepEqual(
|
||||||
|
listed.tools.map((tool) => tool.name),
|
||||||
|
["list_indexed_repos"],
|
||||||
|
"[discord-allowlist-opt-in-0] Expected Discord tools stripped while preserving source tool",
|
||||||
|
);
|
||||||
|
await assertToolRefused(client, { name: "search_history", arguments: { query: "test" } });
|
||||||
|
await assertToolRefused(client, { name: "get_message_context", arguments: { messageId: "1" } });
|
||||||
|
});
|
||||||
|
|
||||||
|
delete process.env.VOIDBOT_MCP_TOOL_ALLOWLIST;
|
||||||
|
process.env.VOIDBOT_ALLOW_DISCORD_HISTORY = "1";
|
||||||
|
await assertDefaultFailClosedBehavior(context, "opt-in-alone-still-default");
|
||||||
|
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = "search_history,get_message_context";
|
||||||
|
process.env.VOIDBOT_ALLOW_DISCORD_HISTORY = "1";
|
||||||
|
await withConnectedClient(context, async (client) => {
|
||||||
|
const listed = await client.listTools();
|
||||||
|
assert.deepEqual(
|
||||||
|
listed.tools.map((tool) => tool.name).sort(),
|
||||||
|
["get_message_context", "search_history"],
|
||||||
|
"[double-opt-in] Expected explicitly allowlisted Discord tools when VOIDBOT_ALLOW_DISCORD_HISTORY=1",
|
||||||
|
);
|
||||||
|
await assertToolRefused(client, {
|
||||||
|
name: "post_discord_message",
|
||||||
|
arguments: { channelId: "123", content: "blocked" },
|
||||||
|
});
|
||||||
|
await assertToolRefused(client, {
|
||||||
|
name: "search_sources",
|
||||||
|
arguments: { query: "not allowlisted" },
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"MCP tool allowlist and resource fail-closed behavioral tests passed (9 scenarios).",
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
if (originalAllowlist === undefined) {
|
||||||
|
delete process.env.VOIDBOT_MCP_TOOL_ALLOWLIST;
|
||||||
|
} else {
|
||||||
|
process.env.VOIDBOT_MCP_TOOL_ALLOWLIST = originalAllowlist;
|
||||||
|
}
|
||||||
|
if (originalAllowDiscordHistory === undefined) {
|
||||||
|
delete process.env.VOIDBOT_ALLOW_DISCORD_HISTORY;
|
||||||
|
} else {
|
||||||
|
process.env.VOIDBOT_ALLOW_DISCORD_HISTORY = originalAllowDiscordHistory;
|
||||||
|
}
|
||||||
|
await rm(root, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main().catch((error) => {
|
||||||
|
console.error(error);
|
||||||
|
process.exitCode = 1;
|
||||||
|
});
|
||||||
|
|
@ -1,26 +1,22 @@
|
||||||
experiment:
|
experiment:
|
||||||
name: VoidBot
|
name: VoidBot
|
||||||
status: active
|
status: frozen
|
||||||
phase: hardening
|
phase: frozen
|
||||||
premise: >
|
premise: >
|
||||||
Keep VoidBot operable as a Discord-native assistant with real retrieval,
|
Retired on 2026-10-22 and frozen pending full retirement
|
||||||
durable ops, and explicit project memory surfaces instead of letting
|
(eureka-body:follow_up:voidbot-retirement,
|
||||||
continuity dissolve into transcript fog.
|
void-body:ruling:stewardship-and-voidbot-teardown-2026-12-03).
|
||||||
|
Never read archived Discord through VoidBot
|
||||||
|
(gamecult-chat:ruling:discord-taints-training).
|
||||||
|
|
||||||
objective:
|
objective:
|
||||||
primary: >
|
primary: >
|
||||||
Maintain and extend VoidBot as a Discord-native assistant for GameCult with
|
Frozen historical VoidBot repository pending full retirement. Never read
|
||||||
grounded answers from archived Discord history, indexed source trees, and
|
archived Discord through VoidBot (gamecult-chat:ruling:discord-taints-training).
|
||||||
Aetheria lore, while keeping the system understandable enough to modify
|
|
||||||
safely.
|
|
||||||
current: >
|
current: >
|
||||||
Keep the recovered read-only archive/source retrieval organ healthy on
|
Deactivated and frozen pending full retirement. Default MCP tool exposure
|
||||||
surviving old Yggdrasil while the newly admitted source-refresh writer
|
fails closed to non-Discord read-only source-retrieval tools only; Discord,
|
||||||
completes its first recovery pass. The query path remains live and
|
worker jobs, Personas, moderation, and delivery remain stopped.
|
||||||
read-only; `voidbot-source-refresh.service` owns public-repository mirroring
|
|
||||||
and coordinated archive/Qdrant writes outside the retrieval MCP boundary.
|
|
||||||
Keep Discord, worker jobs, Personas, moderation, and delivery stopped until
|
|
||||||
their missing authority and credentials are deliberately rebuilt.
|
|
||||||
|
|
||||||
constraints:
|
constraints:
|
||||||
- Disaster recovery currently targets trusted old Yggdrasil at 94.130.75.184; retired Big Yggdrasil at 94.130.223.131 is not a GameCult host and must not be trusted or targeted.
|
- Disaster recovery currently targets trusted old Yggdrasil at 94.130.75.184; retired Big Yggdrasil at 94.130.223.131 is not a GameCult host and must not be trusted or targeted.
|
||||||
|
|
@ -39,8 +35,7 @@ invariants:
|
||||||
- Scratch is temporary and disposable.
|
- Scratch is temporary and disposable.
|
||||||
- Evidence is durable and distilled; routine activity proof belongs in git history, commits, smoke artifacts, or targeted logs.
|
- Evidence is durable and distilled; routine activity proof belongs in git history, commits, smoke artifacts, or targeted logs.
|
||||||
- Jobs, audit events, interaction memory, and rate-limit state live in Postgres; vectors live in Qdrant; archives, artifacts, logs, and backups remain under `.voidbot/`.
|
- Jobs, audit events, interaction memory, and rate-limit state live in Postgres; vectors live in Qdrant; archives, artifacts, logs, and backups remain under `.voidbot/`.
|
||||||
- Source, repo, and lore answers should use source-side retrieval when the reply depends on indexed facts; the hinting is advisory, not a lexical veto.
|
- Source, repo, and lore answers should use source-side retrieval only when needed; archived Discord history must never be read through VoidBot (`gamecult-chat:ruling:discord-taints-training`).
|
||||||
- When GameCult history, repo, or lore retrieval can answer the question, use the VoidBot MCP surfaces before raw repo spelunking.
|
|
||||||
|
|
||||||
data_flow:
|
data_flow:
|
||||||
observe:
|
observe:
|
||||||
|
|
@ -63,7 +58,7 @@ data_flow:
|
||||||
|
|
||||||
active_subgoals:
|
active_subgoals:
|
||||||
- Keep the deployed read-only `get_exact_source_document` contract inside the recovery allow-list. The source archive remains the sole owner; consumers hash and receipt returned content. Yggdrasil release `20260816T193315Z-c88c71909dbc` and the Starfire full-document witness prove the live path.
|
- Keep the deployed read-only `get_exact_source_document` contract inside the recovery allow-list. The source archive remains the sole owner; consumers hash and receipt returned content. Yggdrasil release `20260816T193315Z-c88c71909dbc` and the Starfire full-document witness prove the live path.
|
||||||
- Treat `notes/agent-swarm-teardown-plan-2026-05-21.md` as the historical teardown authority and the restart checklist. The repo Face swarm is live again, but only because the scheduler, prompt, model-output logs, parent Interpreter, Bifrost routing, and worker side-effect rails now have explicit observable boundaries. Keep watching for prompt/parser/transport Jenga before adding new swarm features.
|
- Historical note: `notes/agent-swarm-teardown-plan-2026-05-21.md` was the May 2026 teardown checklist. The repo Face swarm is retired and frozen (not live); VoidBot retired on `2026-10-22` and is frozen pending full retirement (`eureka-body:follow_up:voidbot-retirement`, `void-body:ruling:stewardship-and-voidbot-teardown-2026-12-03`).
|
||||||
- Make the new project-state surfaces the default continuity path for nontrivial VoidBot work.
|
- Make the new project-state surfaces the default continuity path for nontrivial VoidBot work.
|
||||||
- Keep the rebuilt moderation/self-state foundation on canonical CultCache `.cc` typed operations, never an editable JSON working projection.
|
- Keep the rebuilt moderation/self-state foundation on canonical CultCache `.cc` typed operations, never an editable JSON working projection.
|
||||||
- The source-level `apps/persona-scheduler` design assigns repo Face and native Persona turn pulses to one scheduler process. Its `initiative-engine.ts` owns participant reconciliation, operator heat/speed projection, semantic-pressure commits, wall-clock advancement, active-turn freeze/completion recovery, queue-result commits, stale rescheduling, mention priority, rest/idle eligibility, and ready-order selection as a pure state machine. `state-store.ts` is the sole persistence/migration port: canonical state is one typed `voidbot.persona_scheduler_state` record in `repo-face-heartbeats.cc`; the old JSON shape is accepted only as a one-time migration source and emitted afterward only as a debug/dashboard projection. Missing state is explicit, malformed CultCache fails closed, and the backing store promotes atomic MessagePack writes. Discord attention crosses through immutable per-mention `voidbot.persona_attention_command` CultCache inbox documents resolved from that same canonical path; the bot creates commands, while the scheduler alone ingests, deduplicates, commits, and acknowledges them after durable state. `active-turn-source.ts` reports only Persona job liveness and may fail stale queue claims; it has no Void lock or moderation authority. Persona initiative never registers or dispatches a built-in Void system participant. No current Yggdrasil process runs this scheduler or the independent moderation, rumination, physiology, memory, and candidate-delivery organs.
|
- The source-level `apps/persona-scheduler` design assigns repo Face and native Persona turn pulses to one scheduler process. Its `initiative-engine.ts` owns participant reconciliation, operator heat/speed projection, semantic-pressure commits, wall-clock advancement, active-turn freeze/completion recovery, queue-result commits, stale rescheduling, mention priority, rest/idle eligibility, and ready-order selection as a pure state machine. `state-store.ts` is the sole persistence/migration port: canonical state is one typed `voidbot.persona_scheduler_state` record in `repo-face-heartbeats.cc`; the old JSON shape is accepted only as a one-time migration source and emitted afterward only as a debug/dashboard projection. Missing state is explicit, malformed CultCache fails closed, and the backing store promotes atomic MessagePack writes. Discord attention crosses through immutable per-mention `voidbot.persona_attention_command` CultCache inbox documents resolved from that same canonical path; the bot creates commands, while the scheduler alone ingests, deduplicates, commits, and acknowledges them after durable state. `active-turn-source.ts` reports only Persona job liveness and may fail stale queue claims; it has no Void lock or moderation authority. Persona initiative never registers or dispatches a built-in Void system participant. No current Yggdrasil process runs this scheduler or the independent moderation, rumination, physiology, memory, and candidate-delivery organs.
|
||||||
|
|
@ -105,7 +100,7 @@ accepted_design:
|
||||||
- Deterministic cleanup code should not become a permanent organ just because recent manual cleanup requests accidentally produced compensators. The desired architecture prevents bad state from entering, then uses narrow migrations for historical debris.
|
- Deterministic cleanup code should not become a permanent organ just because recent manual cleanup requests accidentally produced compensators. The desired architecture prevents bad state from entering, then uses narrow migrations for historical debris.
|
||||||
- `owner_codex` and `local_llm` remain distinct lanes with different tool-execution and safety posture.
|
- `owner_codex` and `local_llm` remain distinct lanes with different tool-execution and safety posture.
|
||||||
- Ephemeral room-reading should come from an explicit local-LLM sidecar inference pass plus raw recent-message evidence, not from a rules bucket pretending to understand natural language.
|
- Ephemeral room-reading should come from an explicit local-LLM sidecar inference pass plus raw recent-message evidence, not from a rules bucket pretending to understand natural language.
|
||||||
- The VoidBot MCP server is the preferred search plane for archived Discord, indexed GameCult repos, Aetheria lore, and owner notifications.
|
- Historical note: the VoidBot MCP server previously served archived Discord, indexed GameCult repos, Aetheria lore, and owner notifications; under `gamecult-chat:ruling:discord-taints-training` and `void-body:ruling:stewardship-and-voidbot-teardown-2026-12-03`, archived Discord must never be read and the default fail-closed MCP allowlist exposes only non-Discord read-only source retrieval.
|
||||||
- Bot-directed prompts should remain in the raw Discord archive for forensics, but default history indexing and retrieval should treat them as toxic self-reference rather than ordinary community memory.
|
- Bot-directed prompts should remain in the raw Discord archive for forensics, but default history indexing and retrieval should treat them as toxic self-reference rather than ordinary community memory.
|
||||||
- Moderation review should run as a separate local Codex scheduled loop with tracked rules prompt surfaces plus one ignored structured state file, escalating via `notify_owner` instead of pretending the live Discord bot is a silent auto-punishment machine.
|
- Moderation review should run as a separate local Codex scheduled loop with tracked rules prompt surfaces plus one ignored structured state file, escalating via `notify_owner` instead of pretending the live Discord bot is a silent auto-punishment machine.
|
||||||
- The moderation agent should think of itself as a constructive participant as well as a reviewer, and its ignored structured state should follow a Ghostlight-shaped identity/canonical-state/goals/memories/overlays/runtime split rather than a flat notes bucket.
|
- The moderation agent should think of itself as a constructive participant as well as a reviewer, and its ignored structured state should follow a Ghostlight-shaped identity/canonical-state/goals/memories/overlays/runtime split rather than a flat notes bucket.
|
||||||
|
|
@ -179,7 +174,7 @@ accepted_design:
|
||||||
- Heimdall is locally registered as the Heimdall auth/custody Face. Its durable state lives at `E:/Projects/Heimdall/.voidbot/state/heimdall.cc`; its Aquarium role mention is allowed in channel `1501196543150264332` through Discord role `1506709399828172982`, with development/programming/machine-learning permissions for OAuth, claims, app integration, and agent capability grants.
|
- Heimdall is locally registered as the Heimdall auth/custody Face. Its durable state lives at `E:/Projects/Heimdall/.voidbot/state/heimdall.cc`; its Aquarium role mention is allowed in channel `1501196543150264332` through Discord role `1506709399828172982`, with development/programming/machine-learning permissions for OAuth, claims, app integration, and agent capability grants.
|
||||||
- First chat under a repo identity must initialize the target repo's own `.voidbot` home: `voice/` for identity and mouth files, `state/` for Face/swarm state, `birth/` for Epiphany birth artifacts, and `logs/` for durable worker output. The birth hook uses EpiphanyAgent's repo-personality/birth-runner path over repo contents and git history instead of inventing a VoidBot-only personality generator.
|
- First chat under a repo identity must initialize the target repo's own `.voidbot` home: `voice/` for identity and mouth files, `state/` for Face/swarm state, `birth/` for Epiphany birth artifacts, and `logs/` for durable worker output. The birth hook uses EpiphanyAgent's repo-personality/birth-runner path over repo contents and git history instead of inventing a VoidBot-only personality generator.
|
||||||
- Repo Face personality seeding has a named prompt surface now: `prompts/repo-face-personality-seed.prompt.md`. Use it for newborn or strengthening passes that trawl repo docs, source layout, commit history, repo-local `.voidbot` material, and legacy `memory.json`, then convert useful meaning into typed `.cc` state instead of leaving it in inert memory files.
|
- Repo Face personality seeding has a named prompt surface now: `prompts/repo-face-personality-seed.prompt.md`. Use it for newborn or strengthening passes that trawl repo docs, source layout, commit history, repo-local `.voidbot` material, and legacy `memory.json`, then convert useful meaning into typed `.cc` state instead of leaving it in inert memory files.
|
||||||
- Recent chat consensus can now be packaged for any target Codex workspace through `scripts/feed-codex-chat-consensus.mjs`. The helper reads archived Discord messages, defaults to Aquarium, writes a markdown consensus packet plus a Codex prompt under `.voidbot/artifacts/chat-consensus/`, and only feeds `codex exec` when `--execute` is explicit.
|
- Historical note (retired/prohibited): `scripts/feed-codex-chat-consensus.mjs` previously packaged archived Discord messages into `.voidbot/artifacts/chat-consensus/`; reading archived Discord is prohibited under `gamecult-chat:ruling:discord-taints-training`.
|
||||||
- Persona standing heartbeats are owned by one CTB-style initiative scheduler, not by one task per agent. Wall-clock elapsed time advances recovery bookkeeping; it does not create turn intent. `initiative-engine.ts` may admit a Persona only for an explicit pending mention or fresh semantic response pressure at or above that participant's interrupt threshold, with one pressure-backed unprompted admission per global window. It dispatches only repo/native Persona jobs. Void moderation and rumination never enter CTB. Global heat is operator-controlled through the `voidbot.swarm` Eve slider and can change Persona recovery speed, not intent or aggregate throughput.
|
- Persona standing heartbeats are owned by one CTB-style initiative scheduler, not by one task per agent. Wall-clock elapsed time advances recovery bookkeeping; it does not create turn intent. `initiative-engine.ts` may admit a Persona only for an explicit pending mention or fresh semantic response pressure at or above that participant's interrupt threshold, with one pressure-backed unprompted admission per global window. It dispatches only repo/native Persona jobs. Void moderation and rumination never enter CTB. Global heat is operator-controlled through the `voidbot.swarm` Eve slider and can change Persona recovery speed, not intent or aggregate throughput.
|
||||||
- Dynamic Persona response pressure is a derived scheduler input, not Persona memory or a second initiative owner. Each pulse embeds canonical Face identity-card projections and recent permitted-channel human messages through the existing RAG embedder, converts cosine evidence into bounded recency-decayed noisy-OR pressure, caps awakening to the three strongest scheduler-eligible Faces, and records message-scoped evidence plus one-shot semantic interrupt receipts. Pressure changes the recovery calculation when recovery is next scheduled through `dynamicHeat`; only threshold crossing may pull `nextTurnAt` to the current initiative clock. Pending mentions remain hard obligations and active-turn, rest, blocked-status, idle-cooling, and max-job brakes remain authoritative. Embedding failure fails cool at baseline heat.
|
- Dynamic Persona response pressure is a derived scheduler input, not Persona memory or a second initiative owner. Each pulse embeds canonical Face identity-card projections and recent permitted-channel human messages through the existing RAG embedder, converts cosine evidence into bounded recency-decayed noisy-OR pressure, caps awakening to the three strongest scheduler-eligible Faces, and records message-scoped evidence plus one-shot semantic interrupt receipts. Pressure changes the recovery calculation when recovery is next scheduled through `dynamicHeat`; only threshold crossing may pull `nextTurnAt` to the current initiative clock. Pending mentions remain hard obligations and active-turn, rest, blocked-status, idle-cooling, and max-job brakes remain authoritative. Embedding failure fails cool at baseline heat.
|
||||||
- Runtime liveness is not enough. The operations watchdog must also verify bot/worker freshness by comparing each live process start time against its built `dist/index.js` entrypoint timestamp. A process that predates its entrypoint is stale and must fail `runtime.<component>.freshness`; otherwise source/build repairs can silently sit beside an old in-memory worker that keeps eating new Face action DSL output as private summaries.
|
- Runtime liveness is not enough. The operations watchdog must also verify bot/worker freshness by comparing each live process start time against its built `dist/index.js` entrypoint timestamp. A process that predates its entrypoint is stale and must fail `runtime.<component>.freshness`; otherwise source/build repairs can silently sit beside an old in-memory worker that keeps eating new Face action DSL output as private summaries.
|
||||||
|
|
@ -198,7 +193,7 @@ accepted_design:
|
||||||
- Direct asks addressed to Void must persist as explicit room obligations in moderation state. The reviewed cursor is not the same thing as closure, and optional repo-weather should not preempt an unanswered human.
|
- Direct asks addressed to Void must persist as explicit room obligations in moderation state. The reviewed cursor is not the same thing as closure, and optional repo-weather should not preempt an unanswered human.
|
||||||
- Void's broader moderation jurisdiction is not venue permission. Moderation rumination preserves source `channelId` on recent-history messages and projects a `recentConversationTarget`; replies to Aquarium/source-channel talk should use that source channel and reply anchor, while the configured public room target is only for unanchored herald/artifact announcements.
|
- Void's broader moderation jurisdiction is not venue permission. Moderation rumination preserves source `channelId` on recent-history messages and projects a `recentConversationTarget`; replies to Aquarium/source-channel talk should use that source channel and reply anchor, while the configured public room target is only for unanchored herald/artifact announcements.
|
||||||
- When quiet-room repo weather starts repeating itself, the correction should be deeper archive/repo/lore digging and better salience, not a growing hedge maze of cooldown knobs and brittle rules.
|
- When quiet-room repo weather starts repeating itself, the correction should be deeper archive/repo/lore digging and better salience, not a growing hedge maze of cooldown knobs and brittle rules.
|
||||||
- Before suppressing a thought, the moderation loop should novelty-check it against archived Discord with semantic search. If the room has not really said the thing yet, that novelty should push strongly toward speech rather than silence.
|
- Historical note (retired/prohibited): the retired moderation loop previously novelty-checked thoughts against archived Discord with semantic search; reading archived Discord is prohibited under `gamecult-chat:ruling:discord-taints-training`.
|
||||||
- Moderation novelty now needs two bars, not one: room novelty and self novelty. If Void has already been thinking the same seam in slightly different outfits, future typed memory/incubation maintenance should merge support into the existing thought and bias the next pass toward underexplored repo families or archive terrain instead of rewarding repetition with ripeness.
|
- Moderation novelty now needs two bars, not one: room novelty and self novelty. If Void has already been thinking the same seam in slightly different outfits, future typed memory/incubation maintenance should merge support into the existing thought and bias the next pass toward underexplored repo families or archive terrain instead of rewarding repetition with ripeness.
|
||||||
- Short-term rumination memory is a clustered working surface, not a receipt log. When a new short-term memory shares the same target/topic pressure as an existing one, the typed state service folds it into the existing cluster with merged anchors instead of letting Void rediscover the same thought every pass. Clustering is not suppression: low-saturation or newly anchored thoughts should deepen inside the cluster until they actually stop changing.
|
- Short-term rumination memory is a clustered working surface, not a receipt log. When a new short-term memory shares the same target/topic pressure as an existing one, the typed state service folds it into the existing cluster with merged anchors instead of letting Void rediscover the same thought every pass. Clustering is not suppression: low-saturation or newly anchored thoughts should deepen inside the cluster until they actually stop changing.
|
||||||
- Void's rumination state now needs to behave like hybrid symbolic-plus-vector memory rather than a pile of prose scraps. Persistent memories should stay inspectable, but naps and quiet runs should also maintain compact semantic vectors, resonance clusters, and a multi-run incubation queue so deeper thoughts can mature before they either surface or die.
|
- Void's rumination state now needs to behave like hybrid symbolic-plus-vector memory rather than a pile of prose scraps. Persistent memories should stay inspectable, but naps and quiet runs should also maintain compact semantic vectors, resonance clusters, and a multi-run incubation queue so deeper thoughts can mature before they either surface or die.
|
||||||
|
|
@ -225,7 +220,7 @@ accepted_design:
|
||||||
- The `voidbot.swarm` CultMesh store at `.voidbot/status/cultmesh/voidbot-swarm-state.cc` is derived provider state. If duplicate global documents corrupt it, archive the bad store and regenerate from `scripts/render-voidbot-swarm-dashboard.mjs`; do not treat the broken generated store as canonical truth.
|
- The `voidbot.swarm` CultMesh store at `.voidbot/status/cultmesh/voidbot-swarm-state.cc` is derived provider state. If duplicate global documents corrupt it, archive the bad store and regenerate from `scripts/render-voidbot-swarm-dashboard.mjs`; do not treat the broken generated store as canonical truth.
|
||||||
- Eve v2 live state has one owner path. CultLib dev supplies typed live-publication handles, authenticated retained provider sessions, reconnect evidence, and application receipts (`ebd8c78c`, `d4934233`, `8965f3c0`). Eve resolves component `stateBindings` and owns subscription teardown/rebind without receipt DOM writes (`85b0139`, `522df00`). Hermodr ingests provider sessions and emits ordered snapshot/update/stale/reconnected events without polling (`5cb819e`, `561e320`). VoidBot publishes accepted heat as typed control state and binds both visible heat components to it (`060da23`, `3d86b93`). Live-fire proved initial, provider-driven, and browser-command updates converge through that one path.
|
- Eve v2 live state has one owner path. CultLib dev supplies typed live-publication handles, authenticated retained provider sessions, reconnect evidence, and application receipts (`ebd8c78c`, `d4934233`, `8965f3c0`). Eve resolves component `stateBindings` and owns subscription teardown/rebind without receipt DOM writes (`85b0139`, `522df00`). Hermodr ingests provider sessions and emits ordered snapshot/update/stale/reconnected events without polling (`5cb819e`, `561e320`). VoidBot publishes accepted heat as typed control state and binds both visible heat components to it (`060da23`, `3d86b93`). Live-fire proved initial, provider-driven, and browser-command updates converge through that one path.
|
||||||
- `voidbot.swarm_operator_view.v1` is the live authority for swarm summary, queue, selected Face detail/channels, operations, pressure, pending mentions, recent events, and route state. Eve binds those values as text/list props; the composition renderer no longer computes those browser-visible facts from its generation snapshot. The static HTML artifact may still lower a snapshot for debugging, but it cannot own live browser state.
|
- `voidbot.swarm_operator_view.v1` is the live authority for swarm summary, queue, selected Face detail/channels, operations, pressure, pending mentions, recent events, and route state. Eve binds those values as text/list props; the composition renderer no longer computes those browser-visible facts from its generation snapshot. The static HTML artifact may still lower a snapshot for debugging, but it cannot own live browser state.
|
||||||
- The production Eve nerve is provider-owned VoidBot RUDP on Yggdrasil -> Odin discovery -> Gjallar aggregate -> Hermodr lowering -> EveCanvas/browser. Yggdrasil Hermodr binds `10.77.0.1:8798`; the iPad currently reaches a local Starfire Hermodr lowering at `http://192.168.178.146:8798`. Both Hermodr bodies read Odin/CultMesh and own no provider or aggregate truth. VoidBot remains the state/command owner at `127.0.0.1:17873` on Yggdrasil.
|
- Historical note (retired): the former Eve nerve published VoidBot RUDP on Yggdrasil (`127.0.0.1:17873`) -> Odin discovery -> Gjallar aggregate -> Hermodr lowering (`10.77.0.1:8798` / Starfire `http://192.168.178.146:8798`); VoidBot is retired and frozen pending full teardown.
|
||||||
- The separate read-only `voidbot-retrieval.service` owns the recovered archive/source retrieval endpoint at loopback `127.0.0.1:17875`; no resident VoidBot worker is running there. The source tree retains the task-local stdio bridge and its recovery smoke as transport design, but the bridge starts no SSH, Docker, or remote process and owns no retrieval state.
|
- The separate read-only `voidbot-retrieval.service` owns the recovered archive/source retrieval endpoint at loopback `127.0.0.1:17875`; no resident VoidBot worker is running there. The source tree retains the task-local stdio bridge and its recovery smoke as transport design, but the bridge starts no SSH, Docker, or remote process and owns no retrieval state.
|
||||||
- Long-running work should expose durable logs or status files instead of relying on one attached session and hope.
|
- Long-running work should expose durable logs or status files instead of relying on one attached session and hope.
|
||||||
- Persistent project memory must stay ruthlessly distilled; git history and artifacts carry routine proof.
|
- Persistent project memory must stay ruthlessly distilled; git history and artifacts carry routine proof.
|
||||||
|
|
@ -239,7 +234,7 @@ historical_source_baseline:
|
||||||
- Local and offsite backups, watchdogs, and the operations dashboard describe historical operations.
|
- Local and offsite backups, watchdogs, and the operations dashboard describe historical operations.
|
||||||
- The retired stack had a dedicated logon startup task path; it is not a current recovery mechanism.
|
- The retired stack had a dedicated logon startup task path; it is not a current recovery mechanism.
|
||||||
- Interaction memory and behavioral profiling remain source capabilities, not live-runtime evidence.
|
- Interaction memory and behavioral profiling remain source capabilities, not live-runtime evidence.
|
||||||
- Tool-driven retrieval is live, and source-grounding hints now bias the reply lanes instead of hard-gating them with a lexical pre-classifier.
|
- Historical note (retired): tool-driven retrieval and source-grounding hints landed in source; live runtime is frozen pending full retirement.
|
||||||
- The operations watchdog can now load ignored local extension checks, so adjacent-service fire signals can piggyback on the owner DM path without turning the public repo into cross-project gossip.
|
- The operations watchdog can now load ignored local extension checks, so adjacent-service fire signals can piggyback on the owner DM path without turning the public repo into cross-project gossip.
|
||||||
- The owner Codex lane is now split into orchestration, runtime/parsing, shared helpers, and rendering modules instead of one swollen provider file.
|
- The owner Codex lane is now split into orchestration, runtime/parsing, shared helpers, and rendering modules instead of one swollen provider file.
|
||||||
- The local Ollama lane is now split into orchestration, prompt/render helpers, tool-loop helpers, and shared types/constants instead of one swollen provider file.
|
- The local Ollama lane is now split into orchestration, prompt/render helpers, tool-loop helpers, and shared types/constants instead of one swollen provider file.
|
||||||
|
|
@ -293,5 +288,5 @@ rejected_paths:
|
||||||
reason: sleep/distillation that collapses concrete claims into generic abstraction creates memory nonsense and then forces later cleanup compensators
|
reason: sleep/distillation that collapses concrete claims into generic abstraction creates memory nonsense and then forces later cleanup compensators
|
||||||
|
|
||||||
current_status:
|
current_status:
|
||||||
summary: Yggdrasil VoidBot revision `3fa4a8742060ac54b9f0e27b8d8751db76fd3a8c` retains the typed swarm publisher and read-only `voidbot-retrieval.service`. Source-writer restoration and continuity are achieved under gamecult-ops revision `a1c5fc8bec7f7aaf565d8cddcf486605021c7416`: systemd oneshot `voidbot-source-refresh.service` has a 24-hour timeout, its hourly timer is active, and `/usr/local/sbin/refresh-voidbot-sources` processes one repository per stable `voidbot-source-indexer` container while removing a repo from pending only after success and logging `embedded_chunks=N/total`. The redesigned live pass is PID 2279696, `phase=index`, `detail=repo_1_of_56:AetheriaEve`, with 56 repos pending and witness `Repo AetheriaEve: embedded_chunks=64/3739`; Qdrant is green at approximately 93,701 points. Aetheria is already committed and excluded from reconstructed pending. Before that commit, the measured outstanding delta was 69,060 chunks across 51 repos. Full catch-up and final collection agreement remain pending. Discord, worker, Persona scheduler, Postgres, and resident cognition organs remain absent.
|
summary: VoidBot retired on 2026-10-22 and is frozen pending full retirement (`eureka-body:follow_up:voidbot-retirement`, `void-body:ruling:stewardship-and-voidbot-teardown-2026-12-03`). Discord, worker, Persona/repo-Face swarm, Postgres, and resident cognition organs are stopped. `VOIDBOT_MCP_TOOL_ALLOWLIST` fails closed to non-Discord read-only source retrieval (`list_indexed_repos`, `search_sources`, `get_source_context`, `get_exact_source_document`). Never read archived Discord through VoidBot (`gamecult-chat:ruling:discord-taints-training`).
|
||||||
next_action: Keep observing PID 2279696 through `/srv/voidbot/retrieval/status/source-refresh.status`, `/srv/voidbot/retrieval/log/source-refresh.log`, and `/srv/voidbot/retrieval/status/pending-repos.txt`. Writer service restoration is complete; corpus recovery is not. Verify per-repo progress continues, each success durably leaves pending, the full pass settles with no pending work, archive and Qdrant agree, the read-only MCP lists/searches exact current sources, the hourly timer remains active, and no stale indexer container survives.
|
next_action: Keep VoidBot frozen pending full retirement teardown; do not reactivate Discord history retrieval or the retired Face swarm.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue