Compare commits

...

3 Commits

Author SHA1 Message Date
c5a3d7e835 feat: add persona initialization 2026-05-11 16:10:09 +09:00
7b474ddac3 feat: bootstrap BoxBrain foundation 2026-05-11 15:56:56 +09:00
964c9b3159 docs: add BoxBrain foundation plan 2026-05-11 15:54:02 +09:00
18 changed files with 1751 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
node_modules/
dist/
coverage/
.env
.env.*
!.env.example
.DS_Store
.hermes/

View File

@@ -1,2 +1,34 @@
# BoxBrain
BoxBrain is an IdentityDB-backed TypeScript framework for creating synthetic personas that can behave like human-like DM contacts.
The project is framework-first rather than product-first. The current foundation provides:
- provider-agnostic text, structured-output, and image adapter contracts
- one IdentityDB memory space per persona
- persona initialization from personality, history, values, preferences, and relationships
- LLM-generated biography ingestion into IdentityDB fact drafts
- optional profile image generation through an image adapter
- human-like typing and first-reply delay utilities
Planned next APIs include:
- schedule generation and availability state persistence
- inbound DM-style conversation turns with mandatory/contextual memory retrieval
- proactive outbound messages without user input
- HTTP/RPC wrappers around the core library APIs
## Development
```bash
bun install
bun run test
bun run check
bun run build
```
## Current status
The repository is in foundation development. See the implementation plan:
- `docs/plans/2026-05-11-boxbrain-foundation.md`

423
bun.lock Normal file
View File

@@ -0,0 +1,423 @@
{
"lockfileVersion": 1,
"configVersion": 1,
"workspaces": {
"": {
"name": "boxbrain",
"dependencies": {
"identitydb": "file:../IdentityDB",
},
"devDependencies": {
"@types/node": "^24.0.0",
"tsup": "^8.5.0",
"typescript": "^5.8.3",
"vitest": "^3.2.4",
},
},
},
"packages": {
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.7", "", { "os": "aix", "cpu": "ppc64" }, "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg=="],
"@esbuild/android-arm": ["@esbuild/android-arm@0.27.7", "", { "os": "android", "cpu": "arm" }, "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ=="],
"@esbuild/android-arm64": ["@esbuild/android-arm64@0.27.7", "", { "os": "android", "cpu": "arm64" }, "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ=="],
"@esbuild/android-x64": ["@esbuild/android-x64@0.27.7", "", { "os": "android", "cpu": "x64" }, "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg=="],
"@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.27.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw=="],
"@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.27.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ=="],
"@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.27.7", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w=="],
"@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.27.7", "", { "os": "freebsd", "cpu": "x64" }, "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ=="],
"@esbuild/linux-arm": ["@esbuild/linux-arm@0.27.7", "", { "os": "linux", "cpu": "arm" }, "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA=="],
"@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.27.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A=="],
"@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.27.7", "", { "os": "linux", "cpu": "ia32" }, "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg=="],
"@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q=="],
"@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw=="],
"@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.27.7", "", { "os": "linux", "cpu": "ppc64" }, "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ=="],
"@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.27.7", "", { "os": "linux", "cpu": "none" }, "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ=="],
"@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.27.7", "", { "os": "linux", "cpu": "s390x" }, "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw=="],
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.27.7", "", { "os": "linux", "cpu": "x64" }, "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA=="],
"@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.27.7", "", { "os": "none", "cpu": "arm64" }, "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w=="],
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.27.7", "", { "os": "none", "cpu": "x64" }, "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw=="],
"@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.27.7", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A=="],
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.27.7", "", { "os": "openbsd", "cpu": "x64" }, "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg=="],
"@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.27.7", "", { "os": "none", "cpu": "arm64" }, "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw=="],
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.27.7", "", { "os": "sunos", "cpu": "x64" }, "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA=="],
"@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.27.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA=="],
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.27.7", "", { "os": "win32", "cpu": "ia32" }, "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw=="],
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.7", "", { "os": "win32", "cpu": "x64" }, "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg=="],
"@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="],
"@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="],
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.60.3", "", { "os": "android", "cpu": "arm" }, "sha512-x35CNW/ANXG3hE/EZpRU8MXX1JDN86hBb2wMGAtltkz7pc6cxgjpy1OMMfDosOQ+2hWqIkag/fGok1Yady9nGw=="],
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.60.3", "", { "os": "android", "cpu": "arm64" }, "sha512-xw3xtkDApIOGayehp2+Rz4zimfkaX65r4t47iy+ymQB2G4iJCBBfj0ogVg5jpvjpn8UWn/+q9tprxleYeNp3Hw=="],
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.60.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-vo6Y5Qfpx7/5EaamIwi0WqW2+zfiusVihKatLvtN1VFVy3D13uERk/6gZLU1UiHRL6fDXqj/ELIeVRGnvcTE1g=="],
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.60.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-D+0QGcZhBzTN82weOnsSlY7V7+RMmPuF1CkbxyMAGE8+ZHeUjyb76ZiWmBlCu//AQQONvxcqRbwZTajZKqjuOw=="],
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.60.3", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-6HnvHCT7fDyj6R0Ph7A6x8dQS/S38MClRWeDLqc0MdfWkxjiu1HSDYrdPhqSILzjTIC/pnXbbJbo+ft+gy/9hQ=="],
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.60.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-KHLgC3WKlUYW3ShFKnnosZDOJ0xjg9zp7au3sIm2bs/tGBeC2ipmvRh/N7JKi0t9Ue20C0dpEshi8WUubg+cnA=="],
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.60.3", "", { "os": "linux", "cpu": "arm" }, "sha512-DV6fJoxEYWJOvaZIsok7KrYl0tPvga5OZ2yvKHNNYyk/2roMLqQAbGhr78EQ5YhHpnhLKJD3S1WFusAkmUuV5g=="],
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.60.3", "", { "os": "linux", "cpu": "arm" }, "sha512-mQKoJAzvuOs6F+TZybQO4GOTSMUu7v0WdxEk24krQ/uUxXoPTtHjuaUuPmFhtBcM4K0ons8nrE3JyhTuCFtT/w=="],
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.60.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-Whjj2qoiJ6+OOJMGptTYazaJvjOJm+iKHpXQM1P3LzGjt7Ff++Tp7nH4N8J/BUA7R9IHfDyx4DJIflifwnbmIA=="],
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.60.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-4YTNHKqGng5+yiZt3mg77nmyuCfmNfX4fPmyUapBcIk+BdwSwmCWGXOUxhXbBEkFHtoN5boLj/5NON+u5QC9tg=="],
"@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-SU3kNlhkpI4UqlUc2VXPGK9o886ZsSeGfMAX2ba2b8DKmMXq4AL7KUrkSWVbb7koVqx41Yczx6dx5PNargIrEA=="],
"@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-6lDLl5h4TXpB1mTf2rQWnAk/LcXrx9vBfu/DT5TIPhvMhRWaZ5MxkIc8u4lJAmBo6klTe1ywXIUHFjylW505sg=="],
"@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.60.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-BMo8bOw8evlup/8G+cj5xWtPyp93xPdyoSN16Zy90Q2QZ0ZYRhCt6ZJSwbrRzG9HApFabjwj2p25TUPDWrhzqQ=="],
"@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.60.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-E0L8X1dZN1/Rph+5VPF6Xj2G7JJvMACVXtamTJIDrVI44Y3K+G8gQaMEAavbqCGTa16InptiVrX6eM6pmJ+7qA=="],
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-oZJ/WHaVfHUiRAtmTAeo3DcevNsVvH8mbvodjZy7D5QKvCefO371SiKRpxoDcCxB3PTRTLayWBkvmDQKTcX/sw=="],
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-Dhbyh7j9FybM3YaTgaHmVALwA8AkUwTPccyCQ79TG9AJUsMQqgN1DDEZNr4+QUfwiWvLDumW5vdwzoeUF+TNxQ=="],
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.60.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-cJd1X5XhHHlltkaypz1UcWLA8AcoIi1aWhsvaWDskD1oz2eKCypnqvTQ8ykMNI0RSmm7NkTdSqSSD7zM0xa6Ig=="],
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.60.3", "", { "os": "linux", "cpu": "x64" }, "sha512-DAZDBHQfG2oQuhY7mc6I3/qB4LU2fQCjRvxbDwd/Jdvb9fypP4IJ4qmtu6lNjes6B531AI8cg1aKC2di97bUxA=="],
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.60.3", "", { "os": "linux", "cpu": "x64" }, "sha512-cRxsE8c13mZOh3vP+wLDxpQBRrOHDIGOWyDL93Sy0Ga8y515fBcC2pjUfFwUe5T7tqvTvWbCpg1URM/AXdWIXA=="],
"@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.60.3", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QaWcIgRxqEdQdhJqW4DJctsH6HCmo5vHxY0krHSX4jMtOqfzC+dqDGuHM87bu4H8JBeibWx7jFz+h6/4C8wA5Q=="],
"@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.60.3", "", { "os": "none", "cpu": "arm64" }, "sha512-AaXwSvUi3QIPtroAUw1t5yHGIyqKEXwH54WUocFolZhpGDruJcs8c+xPNDRn4XiQsS7MEwnYsHW2l0MBLDMkWg=="],
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.60.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-65LAKM/bAWDqKNEelHlcHvm2V+Vfb8C6INFxQXRHCvaVN1rJfwr4NvdP4FyzUaLqWfaCGaadf6UbTm8xJeYfEg=="],
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.60.3", "", { "os": "win32", "cpu": "ia32" }, "sha512-EEM2gyhBF5MFnI6vMKdX1LAosE627RGBzIoGMdLloPZkXrUN0Ckqgr2Qi8+J3zip/8NVVro3/FjB+tjhZUgUHA=="],
"@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.60.3", "", { "os": "win32", "cpu": "x64" }, "sha512-E5Eb5H/DpxaoXH++Qkv28RcUJboMopmdDUALBczvHMf7hNIxaDZqwY5lK12UK1BHacSmvupoEWGu+n993Z0y1A=="],
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.60.3", "", { "os": "win32", "cpu": "x64" }, "sha512-hPt/bgL5cE+Qp+/TPHBqptcAgPzgj46mPcg/16zNUmbQk0j+mOEQV/+Lqu8QRtDV3Ek95Q6FeFITpuhl6OTsAA=="],
"@types/better-sqlite3": ["@types/better-sqlite3@7.6.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA=="],
"@types/chai": ["@types/chai@5.2.3", "", { "dependencies": { "@types/deep-eql": "*", "assertion-error": "^2.0.1" } }, "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA=="],
"@types/deep-eql": ["@types/deep-eql@4.0.2", "", {}, "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw=="],
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
"@types/node": ["@types/node@24.12.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-8oljBDGun9cIsZRJR6fkihn0TSXJI0UDOOhncYaERq6M0JMDoPLxyscwruJcb4GKS6dvK/d8xebYBg27h/duaQ=="],
"@types/pg": ["@types/pg@8.20.0", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^2.2.0" } }, "sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow=="],
"@vitest/expect": ["@vitest/expect@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig=="],
"@vitest/mocker": ["@vitest/mocker@3.2.4", "", { "dependencies": { "@vitest/spy": "3.2.4", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "optionalPeers": ["msw", "vite"] }, "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ=="],
"@vitest/pretty-format": ["@vitest/pretty-format@3.2.4", "", { "dependencies": { "tinyrainbow": "^2.0.0" } }, "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA=="],
"@vitest/runner": ["@vitest/runner@3.2.4", "", { "dependencies": { "@vitest/utils": "3.2.4", "pathe": "^2.0.3", "strip-literal": "^3.0.0" } }, "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ=="],
"@vitest/snapshot": ["@vitest/snapshot@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "magic-string": "^0.30.17", "pathe": "^2.0.3" } }, "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ=="],
"@vitest/spy": ["@vitest/spy@3.2.4", "", { "dependencies": { "tinyspy": "^4.0.3" } }, "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw=="],
"@vitest/utils": ["@vitest/utils@3.2.4", "", { "dependencies": { "@vitest/pretty-format": "3.2.4", "loupe": "^3.1.4", "tinyrainbow": "^2.0.0" } }, "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA=="],
"acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="],
"any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="],
"assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="],
"aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="],
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
"better-sqlite3": ["better-sqlite3@12.9.0", "", { "dependencies": { "bindings": "^1.5.0", "prebuild-install": "^7.1.1" } }, "sha512-wqUv4Gm3toFpHDQmaKD4QhZm3g1DjUBI0yzS4UBl6lElUmXFYdTQmmEDpAFa5o8FiFiymURypEnfVHzILKaxqQ=="],
"bindings": ["bindings@1.5.0", "", { "dependencies": { "file-uri-to-path": "1.0.0" } }, "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ=="],
"bl": ["bl@4.1.0", "", { "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="],
"buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
"bundle-require": ["bundle-require@5.1.0", "", { "dependencies": { "load-tsconfig": "^0.2.3" }, "peerDependencies": { "esbuild": ">=0.18" } }, "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA=="],
"cac": ["cac@6.7.14", "", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="],
"chai": ["chai@5.3.3", "", { "dependencies": { "assertion-error": "^2.0.1", "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" } }, "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw=="],
"check-error": ["check-error@2.1.3", "", {}, "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA=="],
"chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="],
"chownr": ["chownr@1.1.4", "", {}, "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="],
"commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="],
"confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="],
"consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="],
"debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
"decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="],
"deep-eql": ["deep-eql@5.0.2", "", {}, "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q=="],
"deep-extend": ["deep-extend@0.6.0", "", {}, "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="],
"denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
"end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
"es-module-lexer": ["es-module-lexer@1.7.0", "", {}, "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA=="],
"esbuild": ["esbuild@0.27.7", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.7", "@esbuild/android-arm": "0.27.7", "@esbuild/android-arm64": "0.27.7", "@esbuild/android-x64": "0.27.7", "@esbuild/darwin-arm64": "0.27.7", "@esbuild/darwin-x64": "0.27.7", "@esbuild/freebsd-arm64": "0.27.7", "@esbuild/freebsd-x64": "0.27.7", "@esbuild/linux-arm": "0.27.7", "@esbuild/linux-arm64": "0.27.7", "@esbuild/linux-ia32": "0.27.7", "@esbuild/linux-loong64": "0.27.7", "@esbuild/linux-mips64el": "0.27.7", "@esbuild/linux-ppc64": "0.27.7", "@esbuild/linux-riscv64": "0.27.7", "@esbuild/linux-s390x": "0.27.7", "@esbuild/linux-x64": "0.27.7", "@esbuild/netbsd-arm64": "0.27.7", "@esbuild/netbsd-x64": "0.27.7", "@esbuild/openbsd-arm64": "0.27.7", "@esbuild/openbsd-x64": "0.27.7", "@esbuild/openharmony-arm64": "0.27.7", "@esbuild/sunos-x64": "0.27.7", "@esbuild/win32-arm64": "0.27.7", "@esbuild/win32-ia32": "0.27.7", "@esbuild/win32-x64": "0.27.7" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w=="],
"estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="],
"expand-template": ["expand-template@2.0.3", "", {}, "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="],
"expect-type": ["expect-type@1.3.0", "", {}, "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA=="],
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
"file-uri-to-path": ["file-uri-to-path@1.0.0", "", {}, "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="],
"fix-dts-default-cjs-exports": ["fix-dts-default-cjs-exports@1.0.1", "", { "dependencies": { "magic-string": "^0.30.17", "mlly": "^1.7.4", "rollup": "^4.34.8" } }, "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg=="],
"fs-constants": ["fs-constants@1.0.0", "", {}, "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="],
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
"generate-function": ["generate-function@2.3.1", "", { "dependencies": { "is-property": "^1.0.2" } }, "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ=="],
"github-from-package": ["github-from-package@0.0.0", "", {}, "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="],
"iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="],
"identitydb": ["identitydb@file:../IdentityDB", { "dependencies": { "better-sqlite3": "^12.1.1", "kysely": "^0.28.8", "mysql2": "^3.15.3", "pg": "^8.16.0" }, "devDependencies": { "@types/better-sqlite3": "^7.6.13", "@types/node": "^24.0.0", "@types/pg": "^8.20.0", "tsup": "^8.5.0", "typescript": "^5.8.3", "vitest": "^3.2.4" } }],
"ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
"ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="],
"is-property": ["is-property@1.0.2", "", {}, "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="],
"joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],
"js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="],
"kysely": ["kysely@0.28.17", "", {}, "sha512-nbD8lB9EB3wNdMhOCdx5Li8DxnLbvKByylRLcJ1h+4SkrowVeECAyZlyiKMThF7xFdRz0jSQ2MoJr+wXux2y0Q=="],
"lilconfig": ["lilconfig@3.1.3", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="],
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
"load-tsconfig": ["load-tsconfig@0.2.5", "", {}, "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg=="],
"long": ["long@5.3.2", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="],
"loupe": ["loupe@3.2.1", "", {}, "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ=="],
"lru.min": ["lru.min@1.1.4", "", {}, "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA=="],
"magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
"mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="],
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
"mkdirp-classic": ["mkdirp-classic@0.5.3", "", {}, "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="],
"mlly": ["mlly@1.8.2", "", { "dependencies": { "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.3" } }, "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA=="],
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
"mysql2": ["mysql2@3.22.3", "", { "dependencies": { "aws-ssl-profiles": "^1.1.2", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.7.2", "long": "^5.3.2", "lru.min": "^1.1.4", "named-placeholders": "^1.1.6", "sql-escaper": "^1.3.3" }, "peerDependencies": { "@types/node": ">= 8" } }, "sha512-uWWxvZSRvRhtBdh2CdcuK83YcOfPdmEeEYB069bAmPnV93QApDGVPuvCQOLjlh7tYHEWdgQPrn6kosDxHBVLkA=="],
"mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="],
"named-placeholders": ["named-placeholders@1.1.6", "", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="],
"nanoid": ["nanoid@3.3.12", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ=="],
"napi-build-utils": ["napi-build-utils@2.0.0", "", {}, "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA=="],
"node-abi": ["node-abi@3.92.0", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ=="],
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
"pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="],
"pathval": ["pathval@2.0.1", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="],
"pg": ["pg@8.20.0", "", { "dependencies": { "pg-connection-string": "^2.12.0", "pg-pool": "^3.13.0", "pg-protocol": "^1.13.0", "pg-types": "2.2.0", "pgpass": "1.0.5" }, "optionalDependencies": { "pg-cloudflare": "^1.3.0" }, "peerDependencies": { "pg-native": ">=3.0.1" }, "optionalPeers": ["pg-native"] }, "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA=="],
"pg-cloudflare": ["pg-cloudflare@1.3.0", "", {}, "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ=="],
"pg-connection-string": ["pg-connection-string@2.12.0", "", {}, "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ=="],
"pg-int8": ["pg-int8@1.0.1", "", {}, "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw=="],
"pg-pool": ["pg-pool@3.13.0", "", { "peerDependencies": { "pg": ">=8.0" } }, "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA=="],
"pg-protocol": ["pg-protocol@1.13.0", "", {}, "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w=="],
"pg-types": ["pg-types@2.2.0", "", { "dependencies": { "pg-int8": "1.0.1", "postgres-array": "~2.0.0", "postgres-bytea": "~1.0.0", "postgres-date": "~1.0.4", "postgres-interval": "^1.1.0" } }, "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA=="],
"pgpass": ["pgpass@1.0.5", "", { "dependencies": { "split2": "^4.1.0" } }, "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug=="],
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
"picomatch": ["picomatch@4.0.4", "", {}, "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A=="],
"pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],
"pkg-types": ["pkg-types@1.3.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="],
"postcss": ["postcss@8.5.14", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg=="],
"postcss-load-config": ["postcss-load-config@6.0.1", "", { "dependencies": { "lilconfig": "^3.1.1" }, "peerDependencies": { "jiti": ">=1.21.0", "postcss": ">=8.0.9", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["jiti", "postcss", "tsx", "yaml"] }, "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g=="],
"postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="],
"postgres-bytea": ["postgres-bytea@1.0.1", "", {}, "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ=="],
"postgres-date": ["postgres-date@1.0.7", "", {}, "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q=="],
"postgres-interval": ["postgres-interval@1.2.0", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ=="],
"prebuild-install": ["prebuild-install@7.1.3", "", { "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", "github-from-package": "0.0.0", "minimist": "^1.2.3", "mkdirp-classic": "^0.5.3", "napi-build-utils": "^2.0.0", "node-abi": "^3.3.0", "pump": "^3.0.0", "rc": "^1.2.7", "simple-get": "^4.0.0", "tar-fs": "^2.0.0", "tunnel-agent": "^0.6.0" }, "bin": { "prebuild-install": "bin.js" } }, "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug=="],
"pump": ["pump@3.0.4", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],
"rc": ["rc@1.2.8", "", { "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "bin": { "rc": "./cli.js" } }, "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="],
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
"readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
"resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="],
"rollup": ["rollup@4.60.3", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.60.3", "@rollup/rollup-android-arm64": "4.60.3", "@rollup/rollup-darwin-arm64": "4.60.3", "@rollup/rollup-darwin-x64": "4.60.3", "@rollup/rollup-freebsd-arm64": "4.60.3", "@rollup/rollup-freebsd-x64": "4.60.3", "@rollup/rollup-linux-arm-gnueabihf": "4.60.3", "@rollup/rollup-linux-arm-musleabihf": "4.60.3", "@rollup/rollup-linux-arm64-gnu": "4.60.3", "@rollup/rollup-linux-arm64-musl": "4.60.3", "@rollup/rollup-linux-loong64-gnu": "4.60.3", "@rollup/rollup-linux-loong64-musl": "4.60.3", "@rollup/rollup-linux-ppc64-gnu": "4.60.3", "@rollup/rollup-linux-ppc64-musl": "4.60.3", "@rollup/rollup-linux-riscv64-gnu": "4.60.3", "@rollup/rollup-linux-riscv64-musl": "4.60.3", "@rollup/rollup-linux-s390x-gnu": "4.60.3", "@rollup/rollup-linux-x64-gnu": "4.60.3", "@rollup/rollup-linux-x64-musl": "4.60.3", "@rollup/rollup-openbsd-x64": "4.60.3", "@rollup/rollup-openharmony-arm64": "4.60.3", "@rollup/rollup-win32-arm64-msvc": "4.60.3", "@rollup/rollup-win32-ia32-msvc": "4.60.3", "@rollup/rollup-win32-x64-gnu": "4.60.3", "@rollup/rollup-win32-x64-msvc": "4.60.3", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-pAQK9HalE84QSm4Po3EmWIZPd3FnjkShVkiMlz1iligWYkWQ7wHYd1PF/T7QZ5TVSD6uSTon5gBVMSM4JfBV+A=="],
"safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
"semver": ["semver@7.8.0", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA=="],
"siginfo": ["siginfo@2.0.0", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="],
"simple-concat": ["simple-concat@1.0.1", "", {}, "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="],
"simple-get": ["simple-get@4.0.1", "", { "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA=="],
"source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="],
"source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
"split2": ["split2@4.2.0", "", {}, "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="],
"sql-escaper": ["sql-escaper@1.3.3", "", {}, "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw=="],
"stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="],
"std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
"string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],
"strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="],
"strip-literal": ["strip-literal@3.1.0", "", { "dependencies": { "js-tokens": "^9.0.1" } }, "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg=="],
"sucrase": ["sucrase@3.35.1", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", "tinyglobby": "^0.2.11", "ts-interface-checker": "^0.1.9" }, "bin": { "sucrase": "bin/sucrase", "sucrase-node": "bin/sucrase-node" } }, "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw=="],
"tar-fs": ["tar-fs@2.1.4", "", { "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^2.1.4" } }, "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ=="],
"tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
"thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="],
"thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="],
"tinybench": ["tinybench@2.9.0", "", {}, "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg=="],
"tinyexec": ["tinyexec@0.3.2", "", {}, "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA=="],
"tinyglobby": ["tinyglobby@0.2.16", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg=="],
"tinypool": ["tinypool@1.1.1", "", {}, "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg=="],
"tinyrainbow": ["tinyrainbow@2.0.0", "", {}, "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw=="],
"tinyspy": ["tinyspy@4.0.4", "", {}, "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q=="],
"tree-kill": ["tree-kill@1.2.2", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="],
"ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="],
"tsup": ["tsup@8.5.1", "", { "dependencies": { "bundle-require": "^5.1.0", "cac": "^6.7.14", "chokidar": "^4.0.3", "consola": "^3.4.0", "debug": "^4.4.0", "esbuild": "^0.27.0", "fix-dts-default-cjs-exports": "^1.0.0", "joycon": "^3.1.1", "picocolors": "^1.1.1", "postcss-load-config": "^6.0.1", "resolve-from": "^5.0.0", "rollup": "^4.34.8", "source-map": "^0.7.6", "sucrase": "^3.35.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.11", "tree-kill": "^1.2.2" }, "peerDependencies": { "@microsoft/api-extractor": "^7.36.0", "@swc/core": "^1", "postcss": "^8.4.12", "typescript": ">=4.5.0" }, "optionalPeers": ["@microsoft/api-extractor", "@swc/core", "postcss", "typescript"], "bin": { "tsup": "dist/cli-default.js", "tsup-node": "dist/cli-node.js" } }, "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing=="],
"tunnel-agent": ["tunnel-agent@0.6.0", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w=="],
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
"ufo": ["ufo@1.6.4", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="],
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
"vite": ["vite@7.3.3", "", { "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-/4XH147Ui7OGTjg3HbdWe5arnZQSbfuRzdr9Ec7TQi5I7R+ir0Rlc9GIvD4v0XZurELqA035KVXJXpR61xhiTA=="],
"vite-node": ["vite-node@3.2.4", "", { "dependencies": { "cac": "^6.7.14", "debug": "^4.4.1", "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "bin": { "vite-node": "vite-node.mjs" } }, "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg=="],
"vitest": ["vitest@3.2.4", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", "@vitest/mocker": "3.2.4", "@vitest/pretty-format": "^3.2.4", "@vitest/runner": "3.2.4", "@vitest/snapshot": "3.2.4", "@vitest/spy": "3.2.4", "@vitest/utils": "3.2.4", "chai": "^5.2.0", "debug": "^4.4.1", "expect-type": "^1.2.1", "magic-string": "^0.30.17", "pathe": "^2.0.3", "picomatch": "^4.0.2", "std-env": "^3.9.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.14", "tinypool": "^1.1.1", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", "vite-node": "3.2.4", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "@vitest/browser": "3.2.4", "@vitest/ui": "3.2.4", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@types/debug", "@types/node", "@vitest/browser", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A=="],
"why-is-node-running": ["why-is-node-running@2.3.0", "", { "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" }, "bin": { "why-is-node-running": "cli.js" } }, "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w=="],
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
"xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="],
"estree-walker/@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="],
}
}

View File

@@ -0,0 +1,217 @@
# BoxBrain Foundation Implementation Plan
> **For Hermes:** Use subagent-driven-development skill to implement this plan task-by-task.
**Goal:** Build BoxBrain as a TypeScript/Bun framework for creating and operating IdentityDB-backed synthetic personas that feel like real people in DM-style conversations.
**Architecture:** BoxBrain is a library-first framework with optional API/server adapters later. The core exposes typed services for persona initialization, schedule generation, availability status, inbound conversation turns, and proactive outbound messages. Each persona maps to exactly one IdentityDB space, and all generated biographies, schedules, conversations, statuses, and relationship memories are stored as facts in that space.
**Tech Stack:** Bun, TypeScript, Vitest, tsup, IdentityDB, provider-agnostic LLM/image adapters, deterministic test doubles.
---
## Product scope
BoxBrain models one persona as a durable memory space plus a runtime harness:
- `initializePersona(input)` creates a persona, asks an LLM adapter to generate a detailed life story from personality/history/values/likes/dislikes/relationships, asks another extraction path to split that story into IdentityDB facts, stores every fact in the persona's IdentityDB space, and optionally generates a profile image.
- `generateSchedule(input)` creates a month/week/day schedule for a persona around a date, stores schedule facts keyed by time topics, and derives contact availability windows from the schedule.
- `setAvailability(input)` explicitly sets or updates contact availability: `online`, `do_not_disturb`, or `offline`.
- `sendMessage(input)` handles a user text turn by loading mandatory memories, delegating contextual memory search to an LLM, then asking the persona LLM to emit one or more short DM messages through a tool-like output contract.
- `proactivelyMessage(input)` has no user text and asks the persona to initiate a natural DM.
- Runtime delivery applies non-LLM typing delays based on character count: random 0.050.08 seconds per character.
## Design decisions
1. **Library-first API**
- Implement services and typed interfaces before HTTP routing.
- A later REST/RPC adapter can wrap the same core methods without duplicating logic.
2. **Adapter-first AI provider selection**
- Define small interfaces instead of coupling to a provider SDK:
- `TextModelAdapter.generateText(request)`
- `StructuredModelAdapter.generateObject(request)`
- `ImageModelAdapter.generateImage(request)`
- Provide deterministic fake adapters in tests.
- Provider/model choice is passed via adapter instances, making BoxBrain easier to configure than IdentityDB's lower-level LLM bridge.
3. **IdentityDB space per persona**
- `persona.spaceName` is the canonical scope for all facts.
- No cross-persona reads unless explicitly requested by future APIs.
- Facts use metadata to identify domains: `persona.biography`, `persona.schedule`, `persona.availability`, `persona.conversation`, `persona.relationship`.
4. **LLM delegation boundaries**
- Biography generation is one structured LLM call.
- Fact splitting is one structured LLM call that produces `BoxBrainFactDraft[]`.
- Mandatory memory retrieval is deterministic.
- Natural contextual memory extraction is delegated to a retrieval-planner LLM.
- Persona response generation is delegated to a persona LLM with a tool-output schema for short messages and optional state-change request.
5. **Human-feeling messages**
- Persona messages are short, usually one sentence or less.
- A turn can produce multiple messages.
- The response planner may intentionally omit spaces or introduce typo-like text when persona style supports it.
- Timing is deterministic in tests through an injectable RNG.
6. **Availability semantics**
- `offline`: no answer until a blocker event ends.
- `do_not_disturb`: first answer has low immediate-reply probability plus possible random delay; later messages in the same active exchange only use typing delay.
- `online`: first answer always occurs, with a short-to-somewhat-long random initial delay; later messages only use typing delay.
- A persona may refuse or wind down a conversation before changing availability, using 13 short goodbye messages, then a tool-style status update.
## Task 1: Bootstrap package metadata and strict TypeScript
**Objective:** Create a Bun/TypeScript package foundation without production behavior.
**Files:**
- Create: `package.json`
- Create: `tsconfig.json`
- Create: `tsup.config.ts`
- Create: `vitest.config.ts`
- Create: `.gitignore`
- Modify: `README.md`
**Steps:**
1. Add package scripts: `test`, `check`, `build`, `clean`.
2. Add dependencies: `identitydb` via local `file:../IdentityDB` for initial development.
3. Add dev dependencies: `typescript`, `vitest`, `tsup`, `@types/node`.
4. Configure strict TypeScript with `exactOptionalPropertyTypes`.
5. Keep README in English with a concise project description.
6. Run `bun install`, `bun run check`, `bun run test`.
7. Commit: `chore: bootstrap BoxBrain package`.
## Task 2: Define public domain and adapter contracts with TDD
**Objective:** Establish stable typed contracts for personas, adapters, facts, schedules, availability, and messages.
**Files:**
- Create: `src/types.ts`
- Create: `src/adapters.ts`
- Create: `src/index.ts`
- Test: `tests/public-api.test.ts`
**Behavior to test first:**
- Public exports include all adapter interfaces and domain types.
- `createTypingDelay` computes per-message timing inside the configured character range when using deterministic RNG.
**Implementation notes:**
- Use type-only tests sparingly; prefer runtime helper tests where possible.
- Keep provider adapters minimal and provider-agnostic.
**Commit:** `feat: define BoxBrain public contracts`.
## Task 3: Implement deterministic timing utilities with TDD
**Objective:** Provide reusable timing calculations for online/DND first replies and per-message typing delay.
**Files:**
- Create: `src/timing.ts`
- Test: `tests/timing.test.ts`
**Behavior to test first:**
- Typing delay equals `message.length * randomSecondsPerCharacter` with random range 0.050.08 by default.
- Empty messages produce zero typing delay.
- First reply timing distinguishes online and do-not-disturb.
- Subsequent replies skip initial availability delay.
**Commit:** `feat: add human typing timing utilities`.
## Task 4: Implement IdentityDB fact persistence helpers with TDD
**Objective:** Convert BoxBrain fact drafts into IdentityDB writes scoped to one persona space.
**Files:**
- Create: `src/memory.ts`
- Test: `tests/memory.test.ts`
**Behavior to test first:**
- Facts are stored with the provided `spaceName`.
- Fact metadata includes a BoxBrain domain and source marker.
- Empty fact arrays are accepted without writes.
**Implementation notes:**
- Use IdentityDB's `addFact` and `upsertSpace` APIs.
- Prefer integration tests with SQLite `:memory:`.
**Commit:** `feat: persist BoxBrain facts in persona spaces`.
## Task 5: Implement persona initialization with TDD
**Objective:** Create personas, generate biographies, split them into facts, store them in IdentityDB, and optionally generate profile images.
**Files:**
- Create: `src/persona.ts`
- Test: `tests/persona.test.ts`
**Behavior to test first:**
- Initialization creates a stable persona object with `id`, `spaceName`, and profile fields.
- Biography adapter is called with personality, history, values, preferences, relationships, and current date context.
- Fact splitter adapter output is stored in the persona's space.
- Profile image adapter is not called unless requested.
- Profile image result is returned and stored as a fact when requested.
**Commit:** `feat: initialize IdentityDB-backed personas`.
## Task 6: Implement schedule and availability APIs with TDD
**Objective:** Generate schedules around dates, persist them as time-topic facts, and derive contact availability.
**Files:**
- Create: `src/schedule.ts`
- Create: `src/availability.ts`
- Test: `tests/schedule.test.ts`
- Test: `tests/availability.test.ts`
**Behavior to test first:**
- Day/week/month schedule requests call the schedule LLM adapter with the right horizon.
- Generated schedule items are stored with time topics and schedule metadata.
- Online/DND/offline states are derived from schedule contactability.
- Deleting schedules can remove by elapsed event or before a cutoff date once IdentityDB supports deletion/query hooks; until then expose a plan-safe no-op interface with documented limitation.
**Commit:** `feat: add schedule and availability APIs`.
## Task 7: Implement conversation harness with TDD
**Objective:** Handle inbound text and proactive messages using mandatory memory loading, LLM-guided retrieval, persona response planning, typing delays, and optional status-change tools.
**Files:**
- Create: `src/conversation.ts`
- Test: `tests/conversation.test.ts`
**Behavior to test first:**
- Inbound conversation loads mandatory memory categories before contextual retrieval.
- Retrieval planner receives the user text and mandatory memory summary.
- Persona response planner emits one or more short messages.
- Each message receives a typing delay from `createTypingDelay`.
- Offline status blocks response.
- DND first replies can be delayed or skipped based on injected RNG.
- Proactive messages work without a user text parameter.
- Status-change tool output is translated into an availability update after optional goodbye messages.
**Commit:** `feat: add DM-style conversation harness`.
## Task 8: Documentation and examples
**Objective:** Document framework usage and provide a runnable example using fake adapters.
**Files:**
- Modify: `README.md`
- Create: `examples/basic.ts`
**Verification:**
- `bun run test`
- `bun run check`
- `bun run build`
**Commit:** `docs: document BoxBrain foundation usage`.
## Initial MVP cut for this session
Start with Tasks 14 so the repository has a tested foundation:
1. Package/bootstrap files.
2. Public contracts.
3. Timing utilities.
4. IdentityDB fact persistence helpers.
The persona, schedule, availability, and conversation services should be implemented after the foundation is green.

48
package.json Normal file
View File

@@ -0,0 +1,48 @@
{
"name": "boxbrain",
"version": "0.1.0",
"description": "IdentityDB-backed framework for synthetic human-like personas and DM-style LLM harnesses.",
"license": "MIT",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"files": [
"dist",
"README.md",
"LICENSE"
],
"engines": {
"node": ">=20.0.0"
},
"scripts": {
"build": "tsup",
"check": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"clean": "rm -rf dist coverage"
},
"keywords": [
"ai",
"persona",
"llm",
"memory",
"identitydb",
"simulation"
],
"dependencies": {
"identitydb": "file:../IdentityDB"
},
"devDependencies": {
"@types/node": "^24.0.0",
"tsup": "^8.5.0",
"typescript": "^5.8.3",
"vitest": "^3.2.4"
}
}

44
src/adapters.ts Normal file
View File

@@ -0,0 +1,44 @@
import type { JsonValue } from 'identitydb';
export interface TextGenerationRequest {
prompt: string;
system?: string | undefined;
model?: string | undefined;
temperature?: number | undefined;
metadata?: Record<string, JsonValue> | undefined;
}
export interface TextModelAdapter {
provider: string;
model: string;
generateText(request: TextGenerationRequest): Promise<string>;
}
export interface StructuredGenerationRequest<TSchema = unknown> extends TextGenerationRequest {
schema?: TSchema | undefined;
}
export interface StructuredModelAdapter<TSchema = unknown> {
provider: string;
model: string;
generateObject<TOutput>(request: StructuredGenerationRequest<TSchema>): Promise<TOutput>;
}
export interface ImageGenerationRequest {
prompt: string;
model?: string | undefined;
aspectRatio?: 'square' | 'portrait' | 'landscape' | undefined;
metadata?: Record<string, JsonValue> | undefined;
}
export interface ImageGenerationResult {
url?: string | undefined;
path?: string | undefined;
revisedPrompt?: string | undefined;
}
export interface ImageModelAdapter {
provider: string;
model: string;
generateImage(request: ImageGenerationRequest): Promise<ImageGenerationResult>;
}

5
src/index.ts Normal file
View File

@@ -0,0 +1,5 @@
export * from './adapters';
export * from './memory';
export * from './persona';
export * from './timing';
export * from './types';

100
src/memory.ts Normal file
View File

@@ -0,0 +1,100 @@
import type { AddFactInput, Fact, IdentityDB, JsonValue, TopicCategory } from 'identitydb';
import type { BoxBrainFactDomain, BoxBrainFactDraft, BoxBrainTopicDraft } from './types';
export interface PersistFactDraftsInput {
spaceName: string;
domain: BoxBrainFactDomain;
source: string;
facts: BoxBrainFactDraft[];
}
const IDENTITYDB_TOPIC_CATEGORIES = new Set<TopicCategory>(['entity', 'concept', 'temporal', 'custom']);
export async function persistFactDrafts(db: IdentityDB, input: PersistFactDraftsInput): Promise<Fact[]> {
if (input.facts.length === 0) {
return [];
}
await db.upsertSpace({ name: input.spaceName });
const persisted: Fact[] = [];
for (const draft of input.facts) {
persisted.push(await db.addFact(toAddFactInput(draft, input)));
}
return persisted;
}
function toAddFactInput(draft: BoxBrainFactDraft, input: PersistFactDraftsInput): AddFactInput {
const source = draft.source ?? input.source;
const factInput: AddFactInput = {
spaceName: input.spaceName,
statement: draft.statement,
source,
metadata: withBoxBrainMetadata(draft.metadata, input.domain, source),
topics: draft.topics.map(toTopicInput),
};
if (draft.summary !== undefined) {
factInput.summary = draft.summary;
}
if (draft.confidence !== undefined) {
factInput.confidence = draft.confidence;
}
return factInput;
}
function toTopicInput(topic: BoxBrainTopicDraft): AddFactInput['topics'][number] {
const topicInput: AddFactInput['topics'][number] = {
name: topic.name,
category: toIdentityDbCategory(topic.category),
};
if (topic.granularity !== undefined) {
topicInput.granularity = topic.granularity;
}
if (topic.description !== undefined) {
topicInput.description = topic.description;
}
if (topic.metadata !== undefined) {
topicInput.metadata = topic.metadata;
}
if (topic.role !== undefined) {
topicInput.role = topic.role;
}
return topicInput;
}
function toIdentityDbCategory(category: BoxBrainTopicDraft['category']): TopicCategory {
if (category && IDENTITYDB_TOPIC_CATEGORIES.has(category as TopicCategory)) {
return category as TopicCategory;
}
return 'custom';
}
function withBoxBrainMetadata(
metadata: JsonValue | null | undefined,
domain: BoxBrainFactDomain,
source: string,
): JsonValue {
const base = isJsonObject(metadata) ? metadata : {};
return {
...base,
boxbrain: {
domain,
source,
},
};
}
function isJsonObject(value: JsonValue | null | undefined): value is { [key: string]: JsonValue } {
return Boolean(value && typeof value === 'object' && !Array.isArray(value));
}

277
src/persona.ts Normal file
View File

@@ -0,0 +1,277 @@
import { randomUUID } from 'node:crypto';
import type { IdentityDB } from 'identitydb';
import type { ImageModelAdapter, StructuredModelAdapter } from './adapters';
import { persistFactDrafts } from './memory';
import type { BoxBrainFactDraft, BoxBrainPersonaProfile } from './types';
export interface PersonaRelationshipInput {
name: string;
relationship: string;
description?: string | undefined;
}
export interface InitializePersonaInput {
id?: string | undefined;
displayName: string;
spaceName?: string | undefined;
personality: string;
history?: string | undefined;
values?: string[] | undefined;
likes?: string[] | undefined;
dislikes?: string[] | undefined;
relationships?: PersonaRelationshipInput[] | undefined;
currentDate?: string | undefined;
structuredModel: StructuredModelAdapter;
imageModel?: ImageModelAdapter | undefined;
generateProfileImage?: boolean | undefined;
reuseExistingSpace?: boolean | undefined;
}
export interface PersonaBiographyResult {
biography: string;
}
export interface PersonaFactExtractionResult {
facts: BoxBrainFactDraft[];
}
export interface InitializedPersona extends BoxBrainPersonaProfile {
biography: string;
}
const PERSONA_BIOGRAPHY_SCHEMA = {
type: 'object',
required: ['biography'],
properties: {
biography: { type: 'string', minLength: 1 },
},
} as const;
const PERSONA_FACT_EXTRACTION_SCHEMA = {
type: 'object',
required: ['facts'],
properties: {
facts: {
type: 'array',
items: {
type: 'object',
required: ['statement', 'topics'],
properties: {
statement: { type: 'string', minLength: 1 },
topics: {
type: 'array',
minItems: 1,
items: {
type: 'object',
required: ['name'],
properties: { name: { type: 'string', minLength: 1 } },
},
},
},
},
},
},
} as const;
export async function initializePersona(db: IdentityDB, input: InitializePersonaInput): Promise<InitializedPersona> {
const id = input.id ?? createPersonaId(input.displayName);
const spaceName = input.spaceName ?? `persona:${id}`;
const existingSpace = await db.getSpaceByName(spaceName);
if (existingSpace && !input.reuseExistingSpace) {
throw new Error(`Persona space already exists: ${spaceName}. Pass reuseExistingSpace to append to it intentionally.`);
}
if (input.generateProfileImage && !input.imageModel) {
throw new Error('generateProfileImage requires an imageModel adapter.');
}
const biography = assertPersonaBiographyResult(
await input.structuredModel.generateObject<PersonaBiographyResult>({
prompt: buildBiographyPrompt(input),
schema: PERSONA_BIOGRAPHY_SCHEMA,
metadata: {
boxbrainTask: 'persona.biography.generate',
personaId: id,
},
}),
);
const extracted = assertPersonaFactExtractionResult(
await input.structuredModel.generateObject<PersonaFactExtractionResult>({
prompt: buildFactExtractionPrompt(input.displayName, biography.biography),
schema: PERSONA_FACT_EXTRACTION_SCHEMA,
metadata: {
boxbrainTask: 'persona.biography.extract_facts',
personaId: id,
},
}),
);
let profileImageUrl: string | undefined;
if (input.generateProfileImage && input.imageModel) {
const image = await input.imageModel.generateImage({
prompt: buildProfileImagePrompt(input.displayName, biography.biography),
aspectRatio: 'square',
metadata: {
boxbrainTask: 'persona.profile_image.generate',
personaId: id,
},
});
profileImageUrl = image.url ?? image.path;
}
await db.upsertSpace({
name: spaceName,
description: `BoxBrain persona memory space for ${input.displayName}`,
metadata: {
boxbrain: {
domain: 'persona.space',
personaId: id,
displayName: input.displayName,
},
},
});
await persistFactDrafts(db, {
spaceName,
domain: 'persona.biography',
source: `${input.structuredModel.provider}:${input.structuredModel.model}`,
facts: extracted.facts,
});
if (profileImageUrl && input.imageModel) {
await persistFactDrafts(db, {
spaceName,
domain: 'persona.profile_image',
source: `${input.imageModel.provider}:${input.imageModel.model}`,
facts: [
{
statement: `${input.displayName} has a generated profile image at ${profileImageUrl}.`,
topics: [
{ name: input.displayName, category: 'entity' },
{ name: 'profile image', category: 'concept' },
],
metadata: { profileImageUrl },
},
],
});
}
const persona: InitializedPersona = {
id,
spaceName,
displayName: input.displayName,
biography: biography.biography,
};
if (profileImageUrl !== undefined) {
persona.profileImageUrl = profileImageUrl;
}
return persona;
}
function buildBiographyPrompt(input: InitializePersonaInput): string {
return [
'Create a concrete, detailed life biography for a synthetic persona from birth to now.',
'The biography must include personality, history, values, preferences, dislikes, and relationships when provided.',
`Current date: ${input.currentDate ?? new Date().toISOString().slice(0, 10)}`,
`Display name: ${input.displayName}`,
`Personality: ${input.personality}`,
optionalLine('History', input.history),
listLine('Values', input.values),
listLine('Likes', input.likes),
listLine('Dislikes', input.dislikes),
relationshipLine(input.relationships),
'Return structured output with a biography string.',
]
.filter((line): line is string => Boolean(line))
.join('\n');
}
function buildFactExtractionPrompt(displayName: string, biography: string): string {
return [
`Split ${displayName}'s biography into concrete IdentityDB-ready facts.`,
'Every fact must have a statement and at least one topic.',
'Prefer specific topics for people, places, values, preferences, relationships, and time periods.',
`Biography:\n${biography}`,
'Return structured output with a facts array.',
].join('\n');
}
function buildProfileImagePrompt(displayName: string, biography: string): string {
return [
`Create a natural profile image for ${displayName}.`,
'The image should look like a believable DM profile picture, not a studio product shot.',
`Persona biography summary: ${biography}`,
].join('\n');
}
function createPersonaId(displayName: string): string {
const normalized = displayName
.trim()
.toLowerCase()
.replace(/[^a-z0-9가-힣]+/g, '-')
.replace(/^-+|-+$/g, '');
const prefix = normalized || 'persona';
return `${prefix}-${randomUUID()}`;
}
function assertPersonaBiographyResult(value: PersonaBiographyResult): PersonaBiographyResult {
if (!value || typeof value.biography !== 'string' || value.biography.trim().length === 0) {
throw new Error('Structured persona biography output must include a non-empty biography string.');
}
return value;
}
function assertPersonaFactExtractionResult(value: PersonaFactExtractionResult): PersonaFactExtractionResult {
if (!value || !Array.isArray(value.facts)) {
throw new Error('Structured persona fact extraction output must include a facts array.');
}
for (let factIndex = 0; factIndex < value.facts.length; factIndex += 1) {
const fact = value.facts[factIndex]!;
if (!fact || typeof fact.statement !== 'string' || fact.statement.trim().length === 0) {
throw new Error(`Structured persona fact extraction output has an invalid statement at index ${factIndex}.`);
}
if (!Array.isArray(fact.topics) || fact.topics.length === 0) {
throw new Error(`Structured persona fact extraction output has no topics at index ${factIndex}.`);
}
for (let topicIndex = 0; topicIndex < fact.topics.length; topicIndex += 1) {
const topic = fact.topics[topicIndex]!;
if (!topic || typeof topic.name !== 'string' || topic.name.trim().length === 0) {
throw new Error(
`Structured persona fact extraction output has an invalid topic name at fact index ${factIndex}, topic index ${topicIndex}.`,
);
}
}
}
return value;
}
function optionalLine(label: string, value: string | undefined): string | undefined {
return value ? `${label}: ${value}` : undefined;
}
function listLine(label: string, values: string[] | undefined): string | undefined {
return values && values.length > 0 ? `${label}: ${values.join(', ')}` : undefined;
}
function relationshipLine(relationships: PersonaRelationshipInput[] | undefined): string | undefined {
if (!relationships || relationships.length === 0) {
return undefined;
}
return `Relationships: ${relationships
.map((relationship) => {
const details = relationship.description ? ` (${relationship.description})` : '';
return `${relationship.name}${relationship.relationship}${details}`;
})
.join('; ')}`;
}

78
src/timing.ts Normal file
View File

@@ -0,0 +1,78 @@
import type { BoxBrainAvailability } from './types';
export type RandomSource = () => number;
export interface TypingDelayOptions {
rng?: RandomSource | undefined;
minSecondsPerCharacter?: number | undefined;
maxSecondsPerCharacter?: number | undefined;
}
export interface ReplyDelayOptions {
isFirstReplyInExchange: boolean;
rng?: RandomSource | undefined;
onlineMinSeconds?: number | undefined;
onlineMaxSeconds?: number | undefined;
dndReplyProbability?: number | undefined;
dndMinSeconds?: number | undefined;
dndMaxSeconds?: number | undefined;
}
export const ONLINE_AVAILABILITY: BoxBrainAvailability = { mode: 'online' };
export const DND_AVAILABILITY: BoxBrainAvailability = { mode: 'do_not_disturb' };
export const OFFLINE_AVAILABILITY: BoxBrainAvailability = { mode: 'offline' };
export function createTypingDelay(message: string, options: TypingDelayOptions = {}): number {
if (message.length === 0) {
return 0;
}
const rng = options.rng ?? Math.random;
const min = options.minSecondsPerCharacter ?? 0.05;
const max = options.maxSecondsPerCharacter ?? 0.08;
const secondsPerCharacter = interpolate(min, max, clampUnit(rng()));
return roundSeconds(message.length * secondsPerCharacter);
}
export function createReplyDelay(
availability: BoxBrainAvailability,
options: ReplyDelayOptions,
): number | null {
if (availability.mode === 'offline') {
return null;
}
if (!options.isFirstReplyInExchange) {
return 0;
}
const rng = options.rng ?? Math.random;
if (availability.mode === 'do_not_disturb') {
const probability = options.dndReplyProbability ?? 0.2;
if (clampUnit(rng()) > probability) {
return null;
}
return roundSeconds(interpolate(options.dndMinSeconds ?? 60, options.dndMaxSeconds ?? 600, clampUnit(rng())));
}
return roundSeconds(interpolate(options.onlineMinSeconds ?? 1, options.onlineMaxSeconds ?? 12, clampUnit(rng())));
}
function interpolate(min: number, max: number, ratio: number): number {
return min + (max - min) * ratio;
}
function clampUnit(value: number): number {
if (Number.isNaN(value)) {
return 0;
}
return Math.min(1, Math.max(0, value));
}
function roundSeconds(value: number): number {
return Math.round(value * 1_000_000) / 1_000_000;
}

48
src/types.ts Normal file
View File

@@ -0,0 +1,48 @@
import type { JsonValue, TopicCategory, TopicGranularity } from 'identitydb';
export type BoxBrainFactDomain =
| 'persona.biography'
| 'persona.profile_image'
| 'persona.schedule'
| 'persona.availability'
| 'persona.conversation'
| 'persona.relationship'
| (string & {});
export type BoxBrainAvailabilityMode = 'online' | 'do_not_disturb' | 'offline';
export interface BoxBrainTopicDraft {
name: string;
category?: TopicCategory | (string & {}) | undefined;
granularity?: TopicGranularity | undefined;
description?: string | null | undefined;
metadata?: JsonValue | null | undefined;
role?: string | null | undefined;
}
export interface BoxBrainFactDraft {
statement: string;
summary?: string | null | undefined;
source?: string | null | undefined;
confidence?: number | null | undefined;
metadata?: JsonValue | null | undefined;
topics: BoxBrainTopicDraft[];
}
export interface BoxBrainAvailability {
mode: BoxBrainAvailabilityMode;
reason?: string | undefined;
until?: string | undefined;
}
export interface BoxBrainMessage {
text: string;
typingDelaySeconds: number;
}
export interface BoxBrainPersonaProfile {
id: string;
spaceName: string;
displayName: string;
profileImageUrl?: string | undefined;
}

84
tests/memory.test.ts Normal file
View File

@@ -0,0 +1,84 @@
import { afterEach, describe, expect, it } from 'vitest';
import { IdentityDB } from 'identitydb';
import { persistFactDrafts } from '../src/memory';
const openDbs: IdentityDB[] = [];
async function createDb() {
const db = await IdentityDB.connect({ client: 'sqlite', filename: ':memory:' });
await db.initialize();
openDbs.push(db);
return db;
}
afterEach(async () => {
while (openDbs.length > 0) {
await openDbs.pop()!.close();
}
});
describe('persistFactDrafts', () => {
it('stores drafted facts in the requested persona space', async () => {
const db = await createDb();
const [fact] = await persistFactDrafts(db, {
spaceName: 'persona:minji',
domain: 'persona.biography',
source: 'boxbrain:test',
facts: [
{
statement: 'Minji grew up near the sea.',
topics: [{ name: 'Minji' }, { name: 'sea' }],
},
],
});
const space = await db.getSpaceByName('persona:minji');
expect(space).not.toBeNull();
expect(fact?.spaceId).toBe(space?.id);
expect(fact?.metadata).toMatchObject({
boxbrain: {
domain: 'persona.biography',
source: 'boxbrain:test',
},
});
});
it('accepts an empty draft list without writes', async () => {
const db = await createDb();
const facts = await persistFactDrafts(db, {
spaceName: 'persona:empty',
domain: 'persona.biography',
source: 'boxbrain:test',
facts: [],
});
expect(facts).toEqual([]);
expect(await db.getSpaceByName('persona:empty')).toBeNull();
});
it('keeps fact source metadata consistent when a draft overrides source', async () => {
const db = await createDb();
const [fact] = await persistFactDrafts(db, {
spaceName: 'persona:source-test',
domain: 'persona.biography',
source: 'boxbrain:batch',
facts: [
{
statement: 'Minji wrote a diary entry.',
source: 'boxbrain:draft',
topics: [{ name: 'Minji' }, { name: 'diary entry' }],
},
],
});
expect(fact?.source).toBe('boxbrain:draft');
expect(fact?.metadata).toMatchObject({
boxbrain: {
source: 'boxbrain:draft',
},
});
});
});

263
tests/persona.test.ts Normal file
View File

@@ -0,0 +1,263 @@
import { afterEach, describe, expect, it } from 'vitest';
import { IdentityDB } from 'identitydb';
import { initializePersona, type PersonaBiographyResult, type PersonaFactExtractionResult } from '../src';
import type { ImageModelAdapter, StructuredModelAdapter } from '../src';
const openDbs: IdentityDB[] = [];
async function createDb() {
const db = await IdentityDB.connect({ client: 'sqlite', filename: ':memory:' });
await db.initialize();
openDbs.push(db);
return db;
}
afterEach(async () => {
while (openDbs.length > 0) {
await openDbs.pop()!.close();
}
});
describe('initializePersona', () => {
it('generates a biography, extracts facts, and stores them in the persona space', async () => {
const db = await createDb();
const prompts: string[] = [];
const structured = createStructuredAdapter(prompts);
const persona = await initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet, playful, observant.',
history: 'Grew up near Busan and studied design.',
values: ['loyalty', 'creative honesty'],
likes: ['quiet cafés'],
dislikes: ['loud arguments'],
relationships: [{ name: 'Haru', relationship: 'best friend', description: 'childhood friend' }],
currentDate: '2026-05-11',
structuredModel: structured,
});
expect(persona).toMatchObject({
id: 'minji',
displayName: 'Minji',
spaceName: 'persona:minji',
biography: 'Minji grew up near the sea and values loyal friendships.',
});
expect(prompts[0]).toContain('Quiet, playful, observant.');
expect(prompts[0]).toContain('creative honesty');
expect(prompts[0]).toContain('Haru');
expect(prompts[0]).toContain('Current date: 2026-05-11');
expect(prompts[1]).toContain('Minji grew up near the sea');
const facts = await db.getTopicFacts('Minji', { spaceName: persona.spaceName });
expect(facts.map((fact) => fact.statement)).toContain('Minji grew up near the sea.');
});
it('does not call the image adapter unless a profile image is requested', async () => {
const db = await createDb();
const structured = createStructuredAdapter([]);
let imageCalls = 0;
const imageModel: ImageModelAdapter = {
provider: 'fake-image',
model: 'fake-image-model',
async generateImage() {
imageCalls += 1;
return { url: 'https://example.test/minji.png' };
},
};
const persona = await initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: structured,
imageModel,
});
expect(persona.profileImageUrl).toBeUndefined();
expect(imageCalls).toBe(0);
});
it('can generate and store a persona profile image when requested', async () => {
const db = await createDb();
const structured = createStructuredAdapter([]);
let imagePrompt = '';
const imageModel: ImageModelAdapter = {
provider: 'fake-image',
model: 'fake-image-model',
async generateImage(request) {
imagePrompt = request.prompt;
return { url: 'https://example.test/minji.png' };
},
};
const persona = await initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: structured,
imageModel,
generateProfileImage: true,
});
expect(imagePrompt).toContain('Minji');
expect(persona.profileImageUrl).toBe('https://example.test/minji.png');
const facts = await db.getTopicFacts('profile image', { spaceName: persona.spaceName });
expect(facts.map((fact) => fact.statement)).toContain('Minji has a generated profile image at https://example.test/minji.png.');
});
it('generates unique default persona spaces when no id is supplied', async () => {
const db = await createDb();
const first = await initializePersona(db, {
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: createStructuredAdapter([]),
});
const second = await initializePersona(db, {
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: createStructuredAdapter([]),
});
expect(first.id).not.toBe(second.id);
expect(first.spaceName).not.toBe(second.spaceName);
});
it('rejects accidental reuse of an existing persona space by default', async () => {
const db = await createDb();
await initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: createStructuredAdapter([]),
});
await expect(
initializePersona(db, {
id: 'minji',
displayName: 'Minji Again',
personality: 'Different.',
structuredModel: createStructuredAdapter([]),
}),
).rejects.toThrow(/already exists/);
});
it('allows explicit reuse of an existing persona space', async () => {
const db = await createDb();
await initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: createStructuredAdapter([]),
});
const persona = await initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: createStructuredAdapter([]),
reuseExistingSpace: true,
});
expect(persona.spaceName).toBe('persona:minji');
});
it('rejects malformed structured biography output', async () => {
const db = await createDb();
const malformed: StructuredModelAdapter = {
provider: 'fake-structured',
model: 'fake-structured-model',
async generateObject<TOutput>(): Promise<TOutput> {
return { biography: '' } as TOutput;
},
};
await expect(
initializePersona(db, {
id: 'broken',
displayName: 'Broken',
personality: 'Quiet.',
structuredModel: malformed,
}),
).rejects.toThrow(/biography/);
expect(await db.getSpaceByName('persona:broken')).toBeNull();
});
it('rejects malformed extracted fact topics before creating a space', async () => {
const db = await createDb();
const malformedFacts: StructuredModelAdapter = {
provider: 'fake-structured',
model: 'fake-structured-model',
async generateObject<TOutput>(request: { prompt: string }): Promise<TOutput> {
if (request.prompt.includes('Create a concrete')) {
return { biography: 'Broken has a biography.' } as TOutput;
}
return {
facts: [
{
statement: 'Broken has a malformed topic.',
topics: [{}],
},
],
} as TOutput;
},
};
await expect(
initializePersona(db, {
id: 'broken-topic',
displayName: 'Broken Topic',
personality: 'Quiet.',
structuredModel: malformedFacts,
}),
).rejects.toThrow(/topic name/);
expect(await db.getSpaceByName('persona:broken-topic')).toBeNull();
});
it('requires an image model when profile image generation is requested', async () => {
const db = await createDb();
await expect(
initializePersona(db, {
id: 'minji',
displayName: 'Minji',
personality: 'Quiet.',
structuredModel: createStructuredAdapter([]),
generateProfileImage: true,
}),
).rejects.toThrow(/imageModel/);
});
});
function createStructuredAdapter(prompts: string[]): StructuredModelAdapter {
let call = 0;
return {
provider: 'fake-structured',
model: 'fake-structured-model',
async generateObject<TOutput>(request: { prompt: string }): Promise<TOutput> {
prompts.push(request.prompt);
call += 1;
if (call === 1) {
return {
biography: 'Minji grew up near the sea and values loyal friendships.',
} satisfies PersonaBiographyResult as TOutput;
}
return {
facts: [
{
statement: 'Minji grew up near the sea.',
topics: [{ name: 'Minji' }, { name: 'sea' }],
},
{
statement: 'Minji values loyal friendships.',
topics: [{ name: 'Minji' }, { name: 'loyal friendships' }],
},
],
} satisfies PersonaFactExtractionResult as TOutput;
},
};
}

37
tests/public-api.test.ts Normal file
View File

@@ -0,0 +1,37 @@
import { describe, expect, it } from 'vitest';
import {
createReplyDelay,
createTypingDelay,
ONLINE_AVAILABILITY,
type BoxBrainFactDraft,
type TextModelAdapter,
} from '../src';
describe('public API', () => {
it('exports timing helpers and runtime availability constants', () => {
expect(createTypingDelay('abcd', { rng: () => 0 })).toBe(0.2);
expect(createReplyDelay(ONLINE_AVAILABILITY, { isFirstReplyInExchange: false, rng: () => 0 })).toBe(0);
});
it('supports provider-agnostic text model adapters', async () => {
const adapter: TextModelAdapter = {
provider: 'fake-provider',
model: 'fake-model',
async generateText(request) {
return `reply:${request.prompt}`;
},
};
await expect(adapter.generateText({ prompt: 'hello' })).resolves.toBe('reply:hello');
});
it('supports BoxBrain fact drafts for IdentityDB persistence', () => {
const fact: BoxBrainFactDraft = {
statement: 'Mina likes quiet cafés.',
topics: [{ name: 'Mina' }, { name: 'quiet cafés', category: 'preference' }],
metadata: { domain: 'persona.biography' },
};
expect(fact.topics.map((topic) => topic.name)).toEqual(['Mina', 'quiet cafés']);
});
});

47
tests/timing.test.ts Normal file
View File

@@ -0,0 +1,47 @@
import { describe, expect, it } from 'vitest';
import {
createReplyDelay,
createTypingDelay,
DND_AVAILABILITY,
OFFLINE_AVAILABILITY,
ONLINE_AVAILABILITY,
} from '../src/timing';
describe('createTypingDelay', () => {
it('uses 0.05 to 0.08 seconds per character by default', () => {
expect(createTypingDelay('12345', { rng: () => 0 })).toBe(0.25);
expect(createTypingDelay('12345', { rng: () => 1 })).toBe(0.4);
expect(createTypingDelay('12345', { rng: () => 0.5 })).toBeCloseTo(0.325);
});
it('returns zero for empty messages', () => {
expect(createTypingDelay('', { rng: () => 1 })).toBe(0);
});
});
describe('createReplyDelay', () => {
it('does not add availability delay after the first reply in an active exchange', () => {
expect(createReplyDelay(ONLINE_AVAILABILITY, { isFirstReplyInExchange: false, rng: () => 1 })).toBe(0);
expect(createReplyDelay(DND_AVAILABILITY, { isFirstReplyInExchange: false, rng: () => 1 })).toBe(0);
});
it('adds an online first-reply delay from the configured range', () => {
expect(createReplyDelay(ONLINE_AVAILABILITY, { isFirstReplyInExchange: true, rng: () => 0 })).toBe(1);
expect(createReplyDelay(ONLINE_AVAILABILITY, { isFirstReplyInExchange: true, rng: () => 1 })).toBe(12);
});
it('can skip do-not-disturb first replies when probability fails', () => {
expect(createReplyDelay(DND_AVAILABILITY, { isFirstReplyInExchange: true, rng: () => 0.99 })).toBeNull();
});
it('returns a do-not-disturb delay when probability succeeds', () => {
const values = [0.1, 0.5];
const rng = () => values.shift() ?? 0;
expect(createReplyDelay(DND_AVAILABILITY, { isFirstReplyInExchange: true, rng })).toBe(330);
});
it('blocks offline replies', () => {
expect(createReplyDelay(OFFLINE_AVAILABILITY, { isFirstReplyInExchange: true, rng: () => 0 })).toBeNull();
});
});

23
tsconfig.json Normal file
View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"lib": ["ES2022"],
"declaration": true,
"declarationMap": true,
"outDir": "dist",
"rootDir": ".",
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"types": ["node", "vitest/globals"]
},
"include": ["src/**/*.ts", "tests/**/*.ts", "vitest.config.ts", "tsup.config.ts"],
"exclude": ["dist", "node_modules"]
}

9
tsup.config.ts Normal file
View File

@@ -0,0 +1,9 @@
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm'],
dts: true,
sourcemap: true,
clean: true,
});

8
vitest.config.ts Normal file
View File

@@ -0,0 +1,8 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
include: ['tests/**/*.test.ts'],
},
});