Q26: knowledge has scope, expiry, and supersession

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 05:47:03 -04:00
1 parent 8c70111c93
commit 18128b5ad4
14 files changed
+252 -56

No files matched your search

+6 -2
View File
@@ -3,10 +3,10 @@ import { KnowledgeService } from "./knowledge-service";
const MEMORY_CHARS = 2_000;
/** Keeps what a finished or failed run of real work concluded, so later runs can find it. */
/** Keeps what a run of real work concluded, for its project or the whole company. */
export function recordRunMemory(
db: DatabaseSync,
input: { orgId: string; runId: string; taskTitle: string; outcome: "completed" | "failed"; text: string },
input: { orgId: string; runId: string; projectId: string | null; taskTitle: string; outcome: "completed" | "failed"; text: string },
): void {
const text = input.text.trim();
if (!text) return;
@@ -18,5 +18,9 @@ export function recordRunMemory(
importance: "normal",
sourceType: "task_run",
sourceId: input.runId,
scopeType: input.projectId ? "project" : "organization",
scopeId: input.projectId,
validUntil: null,
supersedesId: null,
});
}