refactor!(memory): Streamline memory terminology and architecture

This commit is contained in:
2026-07-19 07:03:03 +05:30
parent b4bf70dbae
commit 1ed1edf4cf
15 changed files with 59 additions and 17 deletions

View File

@@ -139,7 +139,7 @@ Guidelines:
if (!this.bufferRepo) return null;
if (entries.length === 0) {
return `=== COGNITIVE BUFFER ===\n(No recent events recorded.)`;
return `=== COGNITIVE BUFFER ===\n(No entries recorded.)`;
}
const recent = entries.slice(-this.memoryLimit);

View File

@@ -50,7 +50,7 @@ export class Architect {
* "monologue" intents are internal thoughts — they bypass validation and
* time-delta generation entirely: the clock does not advance, the world
* state is not mutated or persisted. The caller is responsible for writing
* the monologue to the actor's memory buffer.
* the monologue to the actor's Cognitive Buffer.
*/
async processIntent(
worldState: WorldState,

View File

@@ -6,7 +6,7 @@ import { z } from "zod";
* - "action": A physical or logical action performed in the world.
* - "monologue": An inner thought or internal monologue. Not perceivable by
* any other entity. Bypasses the Architect/validators entirely and is
* written directly to the actor's memory buffer with no outcome.
* written directly to the actor's Cognitive Buffer with no outcome.
*/
export const IntentTypeSchema = z.enum(["dialogue", "action", "monologue"]);
export type IntentType = z.infer<typeof IntentTypeSchema>;

View File

@@ -4,7 +4,7 @@ import { Intent } from "@omnia/intent";
export interface BufferEntry {
id: string;
ownerId: string; // Whose subjective memory buffer this lives in
ownerId: string; // Whose Cognitive Buffer this entry lives in
timestamp: string; // WorldClock.get().toISOString() at write time
locationId: string | null; // Actor's location when this happened

View File

@@ -33,7 +33,7 @@ export function getMemorySectionLength(
now: Date,
): number {
if (entries.length === 0) {
return `=== COGNITIVE BUFFER ===\n(No recent events recorded.)`.length;
return `=== COGNITIVE BUFFER ===\n(No entries recorded.)`.length;
}
const groupedLines: string[] = [];
@@ -246,7 +246,7 @@ Instructions:
Subject Entity ID: ${entity.id}
Current Time: ${now.toISOString()}
Working Memory Candidates for Handoff:
Cognitive Buffer Candidates for Handoff:
${candidatesList}
`.trim();