Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

613 B
Raw Blame
import { buildMemoryContext } from "@/lib/agent/memory-context.mjs";
import { getAgentSession } from "@/lib/agent/session-store";

type SessionContext = { principal?: string; sessionId?: string };

export async function workflowStartAgentMemory(context: SessionContext, intent: string) {
  if (!context.principal || !context.sessionId) return [];
  const session = await getAgentSession(context.principal, context.sessionId).catch(() => null);
  if (!session) return [];
  return buildMemoryContext(session.memorySnapshot || {}, intent, {
    coreChars: 0, jitChars: 6000, maxRelevant: 5,
  }).relevantEntries;
}