MCPcopy
hub / github.com/rohitg00/agentmemory / buildDemoSessions

Function buildDemoSessions

src/cli.ts:1875–1931  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1873type SearchResult = { query: string; hits: number; topTitle: string };
1874
1875function buildDemoSessions(): DemoSession[] {
1876 return [
1877 {
1878 id: generateId("demo"),
1879 title: "Session 1: JWT auth setup",
1880 observations: [
1881 {
1882 toolName: "Write",
1883 toolInput: { file_path: "src/middleware/auth.ts" },
1884 toolOutput:
1885 "Created JWT middleware using jose library. Tokens expire after 30 days. Chose jose over jsonwebtoken for Edge compatibility.",
1886 },
1887 {
1888 toolName: "Write",
1889 toolInput: { file_path: "test/auth.test.ts" },
1890 toolOutput:
1891 "Added token validation tests covering expired, malformed, and valid cases.",
1892 },
1893 {
1894 toolName: "Bash",
1895 toolInput: { command: "npm test" },
1896 toolOutput: "All 12 auth tests passing.",
1897 },
1898 ],
1899 },
1900 {
1901 id: generateId("demo"),
1902 title: "Session 2: Database migration debugging",
1903 observations: [
1904 {
1905 toolName: "Read",
1906 toolInput: { file_path: "prisma/schema.prisma" },
1907 toolOutput:
1908 "Found N+1 query issue in user relations. Need to add include on posts query.",
1909 },
1910 {
1911 toolName: "Edit",
1912 toolInput: { file_path: "src/api/users.ts" },
1913 toolOutput:
1914 "Fixed N+1 by adding Prisma include. Query time dropped from 450ms to 28ms.",
1915 },
1916 ],
1917 },
1918 {
1919 id: generateId("demo"),
1920 title: "Session 3: Rate limiting",
1921 observations: [
1922 {
1923 toolName: "Write",
1924 toolInput: { file_path: "src/middleware/ratelimit.ts" },
1925 toolOutput:
1926 "Added rate limiting middleware with 100 req/min default. Uses in-memory store for dev, Redis for prod.",
1927 },
1928 ],
1929 },
1930 ];
1931}
1932

Callers 1

runDemoFunction · 0.85

Calls 1

generateIdFunction · 0.85

Tested by

no test coverage detected