6const USERS_TABLE = 'nanocog_users_v1';
7
8export async function initializeDatabase() {
9 // Atoms table - core knowledge representation
10 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${ATOMS_TABLE} (
43โ โ โโโ memory.ts # Memory formation and retrieval
44โ โ โโโ reasoning.ts # Pattern recognition and reasoning
45โ โโโ database/
46โ โโโ schema.ts # SQLite schema for persistence
47โโโ shared/
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2import { tables } from "../database/schema.ts";
3import type { Memory, UserProfile, Atom } from "../../shared/types.ts";
4import { MiniAtomSpace } from "./atomspace.ts";
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { initializeDatabase } from "./database/schema.ts";
4import { MiniAtomSpace } from "./cognitive/atomspace.ts";
5import { MemorySystem } from "./cognitive/memory.ts";
17const reasoningEngine = new ReasoningEngine(atomSpace, memorySystem, ecan);
18
19// Initialize database on startup
20await initializeDatabase();
21
22// Unwrap Hono errors to see original error details
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2import { tables } from "../database/schema.ts";
3import type { Atom, Link, AtomSpaceQuery } from "../../shared/types.ts";
4
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { initializeDatabase } from "./database/schema.ts";
4import { MiniAtomSpace } from "./cognitive/atomspace.ts";
5import { MemorySystem } from "./cognitive/memory.ts";
17const reasoningEngine = new ReasoningEngine(atomSpace, memorySystem, ecan);
18
19// Initialize database on startup
20await initializeDatabase();
21
22// Unwrap Hono errors to see original error details
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2import { tables } from "../database/schema.ts";
3import type { Memory, UserProfile, Atom } from "../../shared/types.ts";
4import { MiniAtomSpace } from "./atomspace.ts";
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2import { tables } from "../database/schema.ts";
3import type { Atom, Link, AtomSpaceQuery } from "../../shared/types.ts";
4
6const USERS_TABLE = 'nanocog_users_v1';
7
8export async function initializeDatabase() {
9 // Atoms table - core knowledge representation
10 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${ATOMS_TABLE} (
43โ โ โโโ memory.ts # Memory formation and retrieval
44โ โ โโโ reasoning.ts # Pattern recognition and reasoning
45โ โโโ database/
46โ โโโ schema.ts # SQLite schema for persistence
47โโโ shared/