solanapolis 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +518 -0
- package/bin/solanapolis.js +197 -0
- package/convex/_generated/api.d.ts +175 -0
- package/convex/_generated/api.js +23 -0
- package/convex/_generated/dataModel.d.ts +60 -0
- package/convex/_generated/server.d.ts +143 -0
- package/convex/_generated/server.js +93 -0
- package/convex/agent/conversation.ts +352 -0
- package/convex/agent/embeddingsCache.ts +110 -0
- package/convex/agent/memory.ts +450 -0
- package/convex/agent/schema.ts +53 -0
- package/convex/aiChat.ts +54 -0
- package/convex/aiTown/agent.ts +382 -0
- package/convex/aiTown/agentDescription.ts +27 -0
- package/convex/aiTown/agentInputs.ts +155 -0
- package/convex/aiTown/agentOperations.ts +178 -0
- package/convex/aiTown/conversation.ts +395 -0
- package/convex/aiTown/conversationMembership.ts +38 -0
- package/convex/aiTown/game.ts +371 -0
- package/convex/aiTown/ids.ts +32 -0
- package/convex/aiTown/inputHandler.ts +9 -0
- package/convex/aiTown/inputs.ts +25 -0
- package/convex/aiTown/insertInput.ts +20 -0
- package/convex/aiTown/location.ts +32 -0
- package/convex/aiTown/main.ts +154 -0
- package/convex/aiTown/movement.ts +189 -0
- package/convex/aiTown/player.ts +310 -0
- package/convex/aiTown/playerDescription.ts +35 -0
- package/convex/aiTown/schema.ts +79 -0
- package/convex/aiTown/world.ts +65 -0
- package/convex/aiTown/worldMap.ts +74 -0
- package/convex/chat.ts +79 -0
- package/convex/constants.ts +78 -0
- package/convex/convex.config.ts +6 -0
- package/convex/crons.ts +89 -0
- package/convex/engine/abstractGame.ts +199 -0
- package/convex/engine/historicalObject.ts +355 -0
- package/convex/engine/schema.ts +56 -0
- package/convex/http.ts +36 -0
- package/convex/init.ts +110 -0
- package/convex/messages.ts +53 -0
- package/convex/npcCarAgents.ts +415 -0
- package/convex/schema.ts +61 -0
- package/convex/streaming.ts +23 -0
- package/convex/testing.ts +202 -0
- package/convex/tsconfig.json +18 -0
- package/convex/util/FastIntegerCompression.ts +221 -0
- package/convex/util/assertNever.ts +4 -0
- package/convex/util/asyncMap.ts +20 -0
- package/convex/util/compression.ts +71 -0
- package/convex/util/geometry.ts +132 -0
- package/convex/util/isSimpleObject.ts +11 -0
- package/convex/util/llm.ts +724 -0
- package/convex/util/minheap.ts +38 -0
- package/convex/util/object.ts +22 -0
- package/convex/util/sleep.ts +3 -0
- package/convex/util/types.ts +33 -0
- package/convex/util/xxhash.ts +228 -0
- package/convex/world.ts +257 -0
- package/data/animations/campfire.json +45 -0
- package/data/animations/gentlesparkle.json +37 -0
- package/data/animations/gentlesplash.json +61 -0
- package/data/animations/gentlewaterfall.json +61 -0
- package/data/animations/windmill.json +78 -0
- package/data/characters.ts +121 -0
- package/data/convertMap.js +74 -0
- package/data/gentle.js +330 -0
- package/data/spritesheets/f1.ts +75 -0
- package/data/spritesheets/f2.ts +75 -0
- package/data/spritesheets/f3.ts +75 -0
- package/data/spritesheets/f4.ts +75 -0
- package/data/spritesheets/f5.ts +75 -0
- package/data/spritesheets/f6.ts +75 -0
- package/data/spritesheets/f7.ts +75 -0
- package/data/spritesheets/f8.ts +75 -0
- package/data/spritesheets/p1.ts +59 -0
- package/data/spritesheets/p2.ts +59 -0
- package/data/spritesheets/p3.ts +59 -0
- package/data/spritesheets/player.ts +59 -0
- package/data/spritesheets/types.ts +26 -0
- package/eslint.config.mjs +37 -0
- package/next.config.ts +7 -0
- package/package.json +85 -0
- package/postcss.config.mjs +7 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/helius-icon.svg +84 -0
- package/public/helius-logo.svg +85 -0
- package/public/next.svg +1 -0
- package/public/plane.glb +0 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/scripts/clear-city.ts +74 -0
- package/scripts/seed-wallets.ts +185 -0
- package/scripts/setup-webhook.ts +73 -0
- package/src/app/api/auth/callback/route.ts +6 -0
- package/src/app/api/auth/link-wallet/route.ts +6 -0
- package/src/app/api/auth/phantom/route.ts +6 -0
- package/src/app/api/broadcast-position/route.ts +59 -0
- package/src/app/api/leaderboard/route.ts +85 -0
- package/src/app/api/network-stats/route.ts +86 -0
- package/src/app/api/parcel-reward/route.ts +181 -0
- package/src/app/api/queue-status/route.ts +30 -0
- package/src/app/api/snapshots/route.ts +37 -0
- package/src/app/api/transactions/enhanced/route.ts +57 -0
- package/src/app/api/treasury/route.ts +83 -0
- package/src/app/api/wallet/[address]/balances/route.ts +124 -0
- package/src/app/api/wallet/[address]/identity/route.ts +32 -0
- package/src/app/api/wallet/[address]/route.ts +216 -0
- package/src/app/api/wallet/[address]/traded-tokens/route.ts +41 -0
- package/src/app/api/wallets/route.ts +68 -0
- package/src/app/api/webhooks/helius/route.ts +76 -0
- package/src/app/auth/callback/page.tsx +29 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +39 -0
- package/src/app/layout.tsx +43 -0
- package/src/app/page.tsx +16 -0
- package/src/components/AITownNPCs.tsx +206 -0
- package/src/components/ActivityFeed.tsx +189 -0
- package/src/components/AuthPanel.tsx +163 -0
- package/src/components/BeachScene.tsx +280 -0
- package/src/components/Building.tsx +138 -0
- package/src/components/CesiumFlight.tsx +1768 -0
- package/src/components/CesiumGlobe.tsx +616 -0
- package/src/components/CitizenCard.tsx +442 -0
- package/src/components/CitizenCardModal.tsx +153 -0
- package/src/components/CityGrid.tsx +313 -0
- package/src/components/CityLandmarks.tsx +427 -0
- package/src/components/CityScene.tsx +1289 -0
- package/src/components/CitySlotsBadge.tsx +68 -0
- package/src/components/CockpitHUD.tsx +460 -0
- package/src/components/ConvexWrapper.tsx +19 -0
- package/src/components/DubaiDistrict.tsx +630 -0
- package/src/components/FlightMiniMap.tsx +133 -0
- package/src/components/GameChat.tsx +383 -0
- package/src/components/GameHUD.tsx +393 -0
- package/src/components/Ground.tsx +14 -0
- package/src/components/HowItWorksModal.tsx +251 -0
- package/src/components/IngestionBanner.tsx +123 -0
- package/src/components/InstancedBuildings.tsx +316 -0
- package/src/components/InstancedCars.tsx +504 -0
- package/src/components/InstancedCityPlanes.tsx +259 -0
- package/src/components/InstancedHouses.tsx +246 -0
- package/src/components/InstancedLampPosts.tsx +201 -0
- package/src/components/InstancedResidentCars.tsx +357 -0
- package/src/components/InstancedRoadDashes.tsx +42 -0
- package/src/components/InstancedSkyscrapers.tsx +434 -0
- package/src/components/InstancedTrees.tsx +67 -0
- package/src/components/LeaderboardPanel.tsx +136 -0
- package/src/components/MultiplayerPlanes.tsx +128 -0
- package/src/components/NetworkStats.tsx +83 -0
- package/src/components/NewBuildingSpotlight.tsx +93 -0
- package/src/components/ParcelChallengeBanner.tsx +242 -0
- package/src/components/ParcelReward.tsx +191 -0
- package/src/components/Park.tsx +42 -0
- package/src/components/PhantomWrapper.tsx +22 -0
- package/src/components/PixelStreamViewer.tsx +335 -0
- package/src/components/PlaneMode.tsx +190 -0
- package/src/components/PlayerCar.tsx +211 -0
- package/src/components/PlayerPlane.tsx +255 -0
- package/src/components/ProjectileRenderer.tsx +249 -0
- package/src/components/QueueStatusBanner.tsx +86 -0
- package/src/components/RealPlayerTags.tsx +82 -0
- package/src/components/SceneLighting.tsx +382 -0
- package/src/components/SelectionBeam.tsx +59 -0
- package/src/components/SwapPanel.tsx +104 -0
- package/src/components/SwapParticles.tsx +237 -0
- package/src/components/TreasureGate.tsx +505 -0
- package/src/components/WalletPanel.tsx +421 -0
- package/src/components/WalletSearch.tsx +244 -0
- package/src/components/WelcomeOverlay.tsx +135 -0
- package/src/components/WindowTooltip.tsx +498 -0
- package/src/context/AuthContext.tsx +230 -0
- package/src/lib/bot-detection.ts +125 -0
- package/src/lib/building-math.ts +136 -0
- package/src/lib/building-shader.ts +253 -0
- package/src/lib/car-paths.ts +244 -0
- package/src/lib/car-system.ts +182 -0
- package/src/lib/city-constants.ts +29 -0
- package/src/lib/city-slots.ts +35 -0
- package/src/lib/city-zoning.ts +64 -0
- package/src/lib/collision-map.ts +147 -0
- package/src/lib/day-night.ts +252 -0
- package/src/lib/export-card.ts +28 -0
- package/src/lib/helius-webhook.ts +90 -0
- package/src/lib/helius.ts +74 -0
- package/src/lib/house-shader.ts +119 -0
- package/src/lib/mock-data.ts +56 -0
- package/src/lib/multiplayer-manager.ts +329 -0
- package/src/lib/plane-physics.ts +66 -0
- package/src/lib/player-car.ts +147 -0
- package/src/lib/player-plane.ts +200 -0
- package/src/lib/projectile-system.ts +272 -0
- package/src/lib/skyscraper-types.ts +52 -0
- package/src/lib/sound-engine.ts +464 -0
- package/src/lib/supabase-admin.ts +9 -0
- package/src/lib/supabase.ts +8 -0
- package/src/lib/swap-events.ts +70 -0
- package/src/middleware.ts +37 -0
- package/src/types/phantom.d.ts +16 -0
- package/src/types/wallet.ts +20 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ╔═══════════════════════════════════════════════════════════╗
|
|
5
|
+
* ║ SOLANAPOLIS — ONE-SHOT LAUNCHER ║
|
|
6
|
+
* ║ ║
|
|
7
|
+
* ║ npx solanapolis → Launch the game ║
|
|
8
|
+
* ║ npx solanapolis --port → Specify port (default: 3000) ║
|
|
9
|
+
* ╚═══════════════════════════════════════════════════════════╝
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const { execSync, spawn } = require("child_process");
|
|
13
|
+
const path = require("path");
|
|
14
|
+
const fs = require("fs");
|
|
15
|
+
const os = require("os");
|
|
16
|
+
|
|
17
|
+
// ── Parse CLI args ──────────────────────────────────────────
|
|
18
|
+
const args = process.argv.slice(2);
|
|
19
|
+
let port = 3000;
|
|
20
|
+
let helpRequested = false;
|
|
21
|
+
|
|
22
|
+
for (let i = 0; i < args.length; i++) {
|
|
23
|
+
if (args[i] === "--port" || args[i] === "-p") {
|
|
24
|
+
port = parseInt(args[i + 1], 10) || 3000;
|
|
25
|
+
i++;
|
|
26
|
+
}
|
|
27
|
+
if (args[i] === "--help" || args[i] === "-h") {
|
|
28
|
+
helpRequested = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (helpRequested) {
|
|
33
|
+
console.log(`
|
|
34
|
+
╔══════════════════════════════════════════════════════╗
|
|
35
|
+
║ 🏙️ SOLANAPOLIS — The Solana City ║
|
|
36
|
+
╠══════════════════════════════════════════════════════╣
|
|
37
|
+
║ ║
|
|
38
|
+
║ Usage: npx solanapolis [options] ║
|
|
39
|
+
║ ║
|
|
40
|
+
║ Options: ║
|
|
41
|
+
║ --port, -p <number> Port to run on (def: 3000) ║
|
|
42
|
+
║ --help, -h Show this help ║
|
|
43
|
+
║ ║
|
|
44
|
+
║ What happens: ║
|
|
45
|
+
║ 1. Installs dependencies ║
|
|
46
|
+
║ 2. Starts the game server ║
|
|
47
|
+
║ 3. Opens your browser ║
|
|
48
|
+
║ 4. Connect your Solana wallet ║
|
|
49
|
+
║ 5. Claim your building & start playing! ║
|
|
50
|
+
║ ║
|
|
51
|
+
╚══════════════════════════════════════════════════════╝
|
|
52
|
+
`);
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ── Fancy banner ────────────────────────────────────────────
|
|
57
|
+
const CYAN = "\x1b[36m";
|
|
58
|
+
const YELLOW = "\x1b[33m";
|
|
59
|
+
const GREEN = "\x1b[32m";
|
|
60
|
+
const MAGENTA = "\x1b[35m";
|
|
61
|
+
const DIM = "\x1b[2m";
|
|
62
|
+
const BOLD = "\x1b[1m";
|
|
63
|
+
const RESET = "\x1b[0m";
|
|
64
|
+
|
|
65
|
+
function banner() {
|
|
66
|
+
console.log(`
|
|
67
|
+
${CYAN}${BOLD}
|
|
68
|
+
███████╗ ██████╗ ██╗ █████╗ ███╗ ██╗ █████╗ ██████╗ ██████╗ ██╗ ██╗███████╗
|
|
69
|
+
██╔════╝██╔═══██╗██║ ██╔══██╗████╗ ██║██╔══██╗██╔══██╗██╔═══██╗██║ ██║██╔════╝
|
|
70
|
+
███████╗██║ ██║██║ ███████║██╔██╗ ██║███████║██████╔╝██║ ██║██║ ██║███████╗
|
|
71
|
+
╚════██║██║ ██║██║ ██╔══██║██║╚██╗██║██╔══██║██╔═══╝ ██║ ██║██║ ██║╚════██║
|
|
72
|
+
███████║╚██████╔╝███████╗██║ ██║██║ ╚████║██║ ██║██║ ╚██████╔╝███████╗██║███████║
|
|
73
|
+
╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝╚═╝╚══════╝
|
|
74
|
+
${RESET}
|
|
75
|
+
${DIM} powered by Heliopolis & Helius on Solana${RESET}
|
|
76
|
+
${YELLOW} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}
|
|
77
|
+
${GREEN} 🏙️ A real-time 3D city built from Solana wallet activity${RESET}
|
|
78
|
+
${GREEN} ✈️ Drive, fly, battle, and explore with multiplayer combat${RESET}
|
|
79
|
+
${GREEN} 🌍 Explore anywhere on Earth with satellite terrain${RESET}
|
|
80
|
+
${YELLOW} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}
|
|
81
|
+
`);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
banner();
|
|
85
|
+
|
|
86
|
+
// ── Resolve the package root (where the game files live) ────
|
|
87
|
+
const pkgRoot = path.resolve(__dirname, "..");
|
|
88
|
+
|
|
89
|
+
// ── Check if dependencies are installed ─────────────────────
|
|
90
|
+
const nodeModulesPath = path.join(pkgRoot, "node_modules");
|
|
91
|
+
if (!fs.existsSync(nodeModulesPath) || !fs.existsSync(path.join(nodeModulesPath, "next"))) {
|
|
92
|
+
console.log(`${MAGENTA}📦 Installing dependencies... (this may take a minute on first run)${RESET}\n`);
|
|
93
|
+
try {
|
|
94
|
+
execSync("npm install --production=false", {
|
|
95
|
+
cwd: pkgRoot,
|
|
96
|
+
stdio: "inherit",
|
|
97
|
+
});
|
|
98
|
+
console.log(`\n${GREEN}✅ Dependencies installed successfully!${RESET}\n`);
|
|
99
|
+
} catch (err) {
|
|
100
|
+
console.error(`\n${"\x1b[31m"}❌ Failed to install dependencies. Please run 'npm install' manually in:${RESET}`);
|
|
101
|
+
console.error(` ${pkgRoot}\n`);
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// ── Write .env.local with baked-in public config ────────────
|
|
107
|
+
const envPath = path.join(pkgRoot, ".env.local");
|
|
108
|
+
if (!fs.existsSync(envPath)) {
|
|
109
|
+
console.log(`${MAGENTA}⚙️ Setting up environment configuration...${RESET}`);
|
|
110
|
+
const envContent = `# Auto-generated by solanapolis CLI
|
|
111
|
+
# These are PUBLIC tokens safe for client-side use — the game server provides API routes
|
|
112
|
+
|
|
113
|
+
NEXT_PUBLIC_CESIUM_ION_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjYTA3ZGU3NC1hOTgwLTQ2OWQtYWJhMi1hZTFjYzFkMWRmNDYiLCJpZCI6NDAyMDYwLCJpYXQiOjE3NzMyNjU2NzZ9.9j1ogEeTOGA5V2d9S6-SnC69WumgjwFM8kl6TLJVjWU
|
|
114
|
+
NEXT_PUBLIC_MAPBOX_TOKEN=pk.eyJ1IjoibWF3ZGJvcnQiLCJhIjoiY21tbTZ0eW4zMmFrMjJwcHZ3MjY1bWwyNyJ9.DzecFESAnfssTNpVMesOBQ
|
|
115
|
+
NEXT_PUBLIC_SUPABASE_URL=https://igpapxaakaqvnfqnvfym.supabase.co
|
|
116
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlncGFweGFha2Fxdm5mcW52ZnltIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjgzMjg5NjYsImV4cCI6MjA4MzkwNDk2Nn0.-xhHkqL5w7BXROGE3GLRm1TlUk7JM8aD29GdO0wYuKA
|
|
117
|
+
NEXT_PUBLIC_CONVEX_URL=https://original-ibex-124.convex.cloud
|
|
118
|
+
NEXT_PUBLIC_CONVEX_SITE_URL=https://original-ibex-124.convex.site
|
|
119
|
+
PHANTOM_APP_ID=a09f21aa-0afd-4493-a64d-ff32d210f47a
|
|
120
|
+
HELIUS_API_KEY=db05afdb-630a-420b-819f-2041776b67ce
|
|
121
|
+
HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=db05afdb-630a-420b-819f-2041776b67ce
|
|
122
|
+
HELIUS_WSS_URL=wss://mainnet.helius-rpc.com/?api-key=db05afdb-630a-420b-819f-2041776b67ce
|
|
123
|
+
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlncGFweGFha2Fxdm5mcW52ZnltIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc2ODMyODk2NiwiZXhwIjoyMDgzOTA0OTY2fQ.T0pP846_DuNRCOArTr5__lnJDR8oDiKPG5-_SdsF3-4
|
|
124
|
+
BIRDEYE_API_KEY=85c9a78b768d4a83b3e84a041f229695
|
|
125
|
+
BIRDEYE_WSS_URL=wss://public-api.birdeye.so/socket/solana?x-api-key=85c9a78b768d4a83b3e84a041f229695
|
|
126
|
+
CONVEX_DEPLOYMENT=prod:original-ibex-124
|
|
127
|
+
NEXT_PUBLIC_PIXEL_STREAMING_URL=ws://localhost:8888
|
|
128
|
+
TREASURY_PRIVATE_KEY=3saf6E6KECcqEBXzHw9KzUWwQQbcoAU1hV8mV4VBrdY97QqFnuKo87Ftvxa81jSn4tMUvCuZ5YRkd92rDSFrHMMp
|
|
129
|
+
`;
|
|
130
|
+
fs.writeFileSync(envPath, envContent);
|
|
131
|
+
console.log(`${GREEN}✅ Environment configured${RESET}\n`);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// ── Launch the game server ──────────────────────────────────
|
|
135
|
+
console.log(`${CYAN}${BOLD}🚀 Starting Solanapolis on port ${port}...${RESET}\n`);
|
|
136
|
+
console.log(`${DIM} Press Ctrl+C to stop the server${RESET}\n`);
|
|
137
|
+
|
|
138
|
+
// Open browser after a delay
|
|
139
|
+
const openUrl = `http://localhost:${port}`;
|
|
140
|
+
setTimeout(() => {
|
|
141
|
+
console.log(`\n${GREEN}${BOLD}🌐 Opening ${openUrl} in your browser...${RESET}\n`);
|
|
142
|
+
console.log(`${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}`);
|
|
143
|
+
console.log(`${GREEN} 🎮 GETTING STARTED:${RESET}`);
|
|
144
|
+
console.log(`${DIM} 1. Click "Connect Wallet" to sign in with Phantom${RESET}`);
|
|
145
|
+
console.log(`${DIM} 2. Your building appears in the city skyline${RESET}`);
|
|
146
|
+
console.log(`${DIM} 3. First 100 wallets get a personal plane ✈️${RESET}`);
|
|
147
|
+
console.log(`${DIM} 4. First 250 wallets get a resident car 🚗${RESET}`);
|
|
148
|
+
console.log(`${DIM} 5. Press G for Globe view 🌍, F for Flight sim ✈️${RESET}`);
|
|
149
|
+
console.log(`${DIM} 6. Drive (WASD) and shoot (F key) in car mode!${RESET}`);
|
|
150
|
+
console.log(`${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}\n`);
|
|
151
|
+
|
|
152
|
+
// Cross-platform browser open
|
|
153
|
+
const platform = os.platform();
|
|
154
|
+
try {
|
|
155
|
+
if (platform === "darwin") {
|
|
156
|
+
execSync(`open ${openUrl}`);
|
|
157
|
+
} else if (platform === "win32") {
|
|
158
|
+
execSync(`start ${openUrl}`);
|
|
159
|
+
} else {
|
|
160
|
+
execSync(`xdg-open ${openUrl}`);
|
|
161
|
+
}
|
|
162
|
+
} catch {
|
|
163
|
+
console.log(`${DIM} (Could not auto-open browser — navigate to ${openUrl} manually)${RESET}`);
|
|
164
|
+
}
|
|
165
|
+
}, 5000);
|
|
166
|
+
|
|
167
|
+
// Start Next.js dev server
|
|
168
|
+
const nextBin = path.join(pkgRoot, "node_modules", ".bin", "next");
|
|
169
|
+
const child = spawn(nextBin, ["dev", "--port", String(port)], {
|
|
170
|
+
cwd: pkgRoot,
|
|
171
|
+
stdio: "inherit",
|
|
172
|
+
env: {
|
|
173
|
+
...process.env,
|
|
174
|
+
PORT: String(port),
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
child.on("error", (err) => {
|
|
179
|
+
console.error(`\n${"\x1b[31m"}❌ Failed to start the game server:${RESET}`, err.message);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
child.on("exit", (code) => {
|
|
184
|
+
process.exit(code ?? 0);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// Handle Ctrl+C gracefully
|
|
188
|
+
process.on("SIGINT", () => {
|
|
189
|
+
console.log(`\n\n${CYAN}👋 Thanks for playing Solanapolis! See you in the city.${RESET}\n`);
|
|
190
|
+
child.kill("SIGINT");
|
|
191
|
+
process.exit(0);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
process.on("SIGTERM", () => {
|
|
195
|
+
child.kill("SIGTERM");
|
|
196
|
+
process.exit(0);
|
|
197
|
+
});
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated `api` utility.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type * as agent_conversation from "../agent/conversation.js";
|
|
12
|
+
import type * as agent_embeddingsCache from "../agent/embeddingsCache.js";
|
|
13
|
+
import type * as agent_memory from "../agent/memory.js";
|
|
14
|
+
import type * as aiChat from "../aiChat.js";
|
|
15
|
+
import type * as aiTown_agent from "../aiTown/agent.js";
|
|
16
|
+
import type * as aiTown_agentDescription from "../aiTown/agentDescription.js";
|
|
17
|
+
import type * as aiTown_agentInputs from "../aiTown/agentInputs.js";
|
|
18
|
+
import type * as aiTown_agentOperations from "../aiTown/agentOperations.js";
|
|
19
|
+
import type * as aiTown_conversation from "../aiTown/conversation.js";
|
|
20
|
+
import type * as aiTown_conversationMembership from "../aiTown/conversationMembership.js";
|
|
21
|
+
import type * as aiTown_game from "../aiTown/game.js";
|
|
22
|
+
import type * as aiTown_ids from "../aiTown/ids.js";
|
|
23
|
+
import type * as aiTown_inputHandler from "../aiTown/inputHandler.js";
|
|
24
|
+
import type * as aiTown_inputs from "../aiTown/inputs.js";
|
|
25
|
+
import type * as aiTown_insertInput from "../aiTown/insertInput.js";
|
|
26
|
+
import type * as aiTown_location from "../aiTown/location.js";
|
|
27
|
+
import type * as aiTown_main from "../aiTown/main.js";
|
|
28
|
+
import type * as aiTown_movement from "../aiTown/movement.js";
|
|
29
|
+
import type * as aiTown_player from "../aiTown/player.js";
|
|
30
|
+
import type * as aiTown_playerDescription from "../aiTown/playerDescription.js";
|
|
31
|
+
import type * as aiTown_world from "../aiTown/world.js";
|
|
32
|
+
import type * as aiTown_worldMap from "../aiTown/worldMap.js";
|
|
33
|
+
import type * as chat from "../chat.js";
|
|
34
|
+
import type * as constants from "../constants.js";
|
|
35
|
+
import type * as crons from "../crons.js";
|
|
36
|
+
import type * as engine_abstractGame from "../engine/abstractGame.js";
|
|
37
|
+
import type * as engine_historicalObject from "../engine/historicalObject.js";
|
|
38
|
+
import type * as http from "../http.js";
|
|
39
|
+
import type * as init from "../init.js";
|
|
40
|
+
import type * as messages from "../messages.js";
|
|
41
|
+
import type * as npcCarAgents from "../npcCarAgents.js";
|
|
42
|
+
import type * as streaming from "../streaming.js";
|
|
43
|
+
import type * as testing from "../testing.js";
|
|
44
|
+
import type * as util_FastIntegerCompression from "../util/FastIntegerCompression.js";
|
|
45
|
+
import type * as util_assertNever from "../util/assertNever.js";
|
|
46
|
+
import type * as util_asyncMap from "../util/asyncMap.js";
|
|
47
|
+
import type * as util_compression from "../util/compression.js";
|
|
48
|
+
import type * as util_geometry from "../util/geometry.js";
|
|
49
|
+
import type * as util_isSimpleObject from "../util/isSimpleObject.js";
|
|
50
|
+
import type * as util_llm from "../util/llm.js";
|
|
51
|
+
import type * as util_minheap from "../util/minheap.js";
|
|
52
|
+
import type * as util_object from "../util/object.js";
|
|
53
|
+
import type * as util_sleep from "../util/sleep.js";
|
|
54
|
+
import type * as util_types from "../util/types.js";
|
|
55
|
+
import type * as util_xxhash from "../util/xxhash.js";
|
|
56
|
+
import type * as world from "../world.js";
|
|
57
|
+
|
|
58
|
+
import type {
|
|
59
|
+
ApiFromModules,
|
|
60
|
+
FilterApi,
|
|
61
|
+
FunctionReference,
|
|
62
|
+
} from "convex/server";
|
|
63
|
+
|
|
64
|
+
declare const fullApi: ApiFromModules<{
|
|
65
|
+
"agent/conversation": typeof agent_conversation;
|
|
66
|
+
"agent/embeddingsCache": typeof agent_embeddingsCache;
|
|
67
|
+
"agent/memory": typeof agent_memory;
|
|
68
|
+
aiChat: typeof aiChat;
|
|
69
|
+
"aiTown/agent": typeof aiTown_agent;
|
|
70
|
+
"aiTown/agentDescription": typeof aiTown_agentDescription;
|
|
71
|
+
"aiTown/agentInputs": typeof aiTown_agentInputs;
|
|
72
|
+
"aiTown/agentOperations": typeof aiTown_agentOperations;
|
|
73
|
+
"aiTown/conversation": typeof aiTown_conversation;
|
|
74
|
+
"aiTown/conversationMembership": typeof aiTown_conversationMembership;
|
|
75
|
+
"aiTown/game": typeof aiTown_game;
|
|
76
|
+
"aiTown/ids": typeof aiTown_ids;
|
|
77
|
+
"aiTown/inputHandler": typeof aiTown_inputHandler;
|
|
78
|
+
"aiTown/inputs": typeof aiTown_inputs;
|
|
79
|
+
"aiTown/insertInput": typeof aiTown_insertInput;
|
|
80
|
+
"aiTown/location": typeof aiTown_location;
|
|
81
|
+
"aiTown/main": typeof aiTown_main;
|
|
82
|
+
"aiTown/movement": typeof aiTown_movement;
|
|
83
|
+
"aiTown/player": typeof aiTown_player;
|
|
84
|
+
"aiTown/playerDescription": typeof aiTown_playerDescription;
|
|
85
|
+
"aiTown/world": typeof aiTown_world;
|
|
86
|
+
"aiTown/worldMap": typeof aiTown_worldMap;
|
|
87
|
+
chat: typeof chat;
|
|
88
|
+
constants: typeof constants;
|
|
89
|
+
crons: typeof crons;
|
|
90
|
+
"engine/abstractGame": typeof engine_abstractGame;
|
|
91
|
+
"engine/historicalObject": typeof engine_historicalObject;
|
|
92
|
+
http: typeof http;
|
|
93
|
+
init: typeof init;
|
|
94
|
+
messages: typeof messages;
|
|
95
|
+
npcCarAgents: typeof npcCarAgents;
|
|
96
|
+
streaming: typeof streaming;
|
|
97
|
+
testing: typeof testing;
|
|
98
|
+
"util/FastIntegerCompression": typeof util_FastIntegerCompression;
|
|
99
|
+
"util/assertNever": typeof util_assertNever;
|
|
100
|
+
"util/asyncMap": typeof util_asyncMap;
|
|
101
|
+
"util/compression": typeof util_compression;
|
|
102
|
+
"util/geometry": typeof util_geometry;
|
|
103
|
+
"util/isSimpleObject": typeof util_isSimpleObject;
|
|
104
|
+
"util/llm": typeof util_llm;
|
|
105
|
+
"util/minheap": typeof util_minheap;
|
|
106
|
+
"util/object": typeof util_object;
|
|
107
|
+
"util/sleep": typeof util_sleep;
|
|
108
|
+
"util/types": typeof util_types;
|
|
109
|
+
"util/xxhash": typeof util_xxhash;
|
|
110
|
+
world: typeof world;
|
|
111
|
+
}>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A utility for referencing Convex functions in your app's public API.
|
|
115
|
+
*
|
|
116
|
+
* Usage:
|
|
117
|
+
* ```js
|
|
118
|
+
* const myFunctionReference = api.myModule.myFunction;
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare const api: FilterApi<
|
|
122
|
+
typeof fullApi,
|
|
123
|
+
FunctionReference<any, "public">
|
|
124
|
+
>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* A utility for referencing Convex functions in your app's internal API.
|
|
128
|
+
*
|
|
129
|
+
* Usage:
|
|
130
|
+
* ```js
|
|
131
|
+
* const myFunctionReference = internal.myModule.myFunction;
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export declare const internal: FilterApi<
|
|
135
|
+
typeof fullApi,
|
|
136
|
+
FunctionReference<any, "internal">
|
|
137
|
+
>;
|
|
138
|
+
|
|
139
|
+
export declare const components: {
|
|
140
|
+
persistentTextStreaming: {
|
|
141
|
+
lib: {
|
|
142
|
+
addChunk: FunctionReference<
|
|
143
|
+
"mutation",
|
|
144
|
+
"internal",
|
|
145
|
+
{ final: boolean; streamId: string; text: string },
|
|
146
|
+
any
|
|
147
|
+
>;
|
|
148
|
+
createStream: FunctionReference<"mutation", "internal", {}, any>;
|
|
149
|
+
getStreamStatus: FunctionReference<
|
|
150
|
+
"query",
|
|
151
|
+
"internal",
|
|
152
|
+
{ streamId: string },
|
|
153
|
+
"pending" | "streaming" | "done" | "error" | "timeout"
|
|
154
|
+
>;
|
|
155
|
+
getStreamText: FunctionReference<
|
|
156
|
+
"query",
|
|
157
|
+
"internal",
|
|
158
|
+
{ streamId: string },
|
|
159
|
+
{
|
|
160
|
+
status: "pending" | "streaming" | "done" | "error" | "timeout";
|
|
161
|
+
text: string;
|
|
162
|
+
}
|
|
163
|
+
>;
|
|
164
|
+
setStreamStatus: FunctionReference<
|
|
165
|
+
"mutation",
|
|
166
|
+
"internal",
|
|
167
|
+
{
|
|
168
|
+
status: "pending" | "streaming" | "done" | "error" | "timeout";
|
|
169
|
+
streamId: string;
|
|
170
|
+
},
|
|
171
|
+
any
|
|
172
|
+
>;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated `api` utility.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { anyApi, componentsGeneric } from "convex/server";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A utility for referencing Convex functions in your app's API.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* ```js
|
|
18
|
+
* const myFunctionReference = api.myModule.myFunction;
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const api = anyApi;
|
|
22
|
+
export const internal = anyApi;
|
|
23
|
+
export const components = componentsGeneric();
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated data model types.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
DataModelFromSchemaDefinition,
|
|
13
|
+
DocumentByName,
|
|
14
|
+
TableNamesInDataModel,
|
|
15
|
+
SystemTableNames,
|
|
16
|
+
} from "convex/server";
|
|
17
|
+
import type { GenericId } from "convex/values";
|
|
18
|
+
import schema from "../schema.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The names of all of your Convex tables.
|
|
22
|
+
*/
|
|
23
|
+
export type TableNames = TableNamesInDataModel<DataModel>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The type of a document stored in Convex.
|
|
27
|
+
*
|
|
28
|
+
* @typeParam TableName - A string literal type of the table name (like "users").
|
|
29
|
+
*/
|
|
30
|
+
export type Doc<TableName extends TableNames> = DocumentByName<
|
|
31
|
+
DataModel,
|
|
32
|
+
TableName
|
|
33
|
+
>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* An identifier for a document in Convex.
|
|
37
|
+
*
|
|
38
|
+
* Convex documents are uniquely identified by their `Id`, which is accessible
|
|
39
|
+
* on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
|
|
40
|
+
*
|
|
41
|
+
* Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
|
|
42
|
+
*
|
|
43
|
+
* IDs are just strings at runtime, but this type can be used to distinguish them from other
|
|
44
|
+
* strings when type checking.
|
|
45
|
+
*
|
|
46
|
+
* @typeParam TableName - A string literal type of the table name (like "users").
|
|
47
|
+
*/
|
|
48
|
+
export type Id<TableName extends TableNames | SystemTableNames> =
|
|
49
|
+
GenericId<TableName>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A type describing your Convex data model.
|
|
53
|
+
*
|
|
54
|
+
* This type includes information about what tables you have, the type of
|
|
55
|
+
* documents stored in those tables, and the indexes defined on them.
|
|
56
|
+
*
|
|
57
|
+
* This type is used to parameterize methods like `queryGeneric` and
|
|
58
|
+
* `mutationGeneric` to make them type-safe.
|
|
59
|
+
*/
|
|
60
|
+
export type DataModel = DataModelFromSchemaDefinition<typeof schema>;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated utilities for implementing server-side Convex query and mutation functions.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
ActionBuilder,
|
|
13
|
+
HttpActionBuilder,
|
|
14
|
+
MutationBuilder,
|
|
15
|
+
QueryBuilder,
|
|
16
|
+
GenericActionCtx,
|
|
17
|
+
GenericMutationCtx,
|
|
18
|
+
GenericQueryCtx,
|
|
19
|
+
GenericDatabaseReader,
|
|
20
|
+
GenericDatabaseWriter,
|
|
21
|
+
} from "convex/server";
|
|
22
|
+
import type { DataModel } from "./dataModel.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Define a query in this Convex app's public API.
|
|
26
|
+
*
|
|
27
|
+
* This function will be allowed to read your Convex database and will be accessible from the client.
|
|
28
|
+
*
|
|
29
|
+
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
30
|
+
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
31
|
+
*/
|
|
32
|
+
export declare const query: QueryBuilder<DataModel, "public">;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Define a query that is only accessible from other Convex functions (but not from the client).
|
|
36
|
+
*
|
|
37
|
+
* This function will be allowed to read from your Convex database. It will not be accessible from the client.
|
|
38
|
+
*
|
|
39
|
+
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
40
|
+
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
41
|
+
*/
|
|
42
|
+
export declare const internalQuery: QueryBuilder<DataModel, "internal">;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Define a mutation in this Convex app's public API.
|
|
46
|
+
*
|
|
47
|
+
* This function will be allowed to modify your Convex database and will be accessible from the client.
|
|
48
|
+
*
|
|
49
|
+
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
50
|
+
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
51
|
+
*/
|
|
52
|
+
export declare const mutation: MutationBuilder<DataModel, "public">;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Define a mutation that is only accessible from other Convex functions (but not from the client).
|
|
56
|
+
*
|
|
57
|
+
* This function will be allowed to modify your Convex database. It will not be accessible from the client.
|
|
58
|
+
*
|
|
59
|
+
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
60
|
+
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
61
|
+
*/
|
|
62
|
+
export declare const internalMutation: MutationBuilder<DataModel, "internal">;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Define an action in this Convex app's public API.
|
|
66
|
+
*
|
|
67
|
+
* An action is a function which can execute any JavaScript code, including non-deterministic
|
|
68
|
+
* code and code with side-effects, like calling third-party services.
|
|
69
|
+
* They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
|
|
70
|
+
* They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
|
|
71
|
+
*
|
|
72
|
+
* @param func - The action. It receives an {@link ActionCtx} as its first argument.
|
|
73
|
+
* @returns The wrapped action. Include this as an `export` to name it and make it accessible.
|
|
74
|
+
*/
|
|
75
|
+
export declare const action: ActionBuilder<DataModel, "public">;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Define an action that is only accessible from other Convex functions (but not from the client).
|
|
79
|
+
*
|
|
80
|
+
* @param func - The function. It receives an {@link ActionCtx} as its first argument.
|
|
81
|
+
* @returns The wrapped function. Include this as an `export` to name it and make it accessible.
|
|
82
|
+
*/
|
|
83
|
+
export declare const internalAction: ActionBuilder<DataModel, "internal">;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Define an HTTP action.
|
|
87
|
+
*
|
|
88
|
+
* The wrapped function will be used to respond to HTTP requests received
|
|
89
|
+
* by a Convex deployment if the requests matches the path and method where
|
|
90
|
+
* this action is routed. Be sure to route your httpAction in `convex/http.js`.
|
|
91
|
+
*
|
|
92
|
+
* @param func - The function. It receives an {@link ActionCtx} as its first argument
|
|
93
|
+
* and a Fetch API `Request` object as its second.
|
|
94
|
+
* @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
|
|
95
|
+
*/
|
|
96
|
+
export declare const httpAction: HttpActionBuilder;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* A set of services for use within Convex query functions.
|
|
100
|
+
*
|
|
101
|
+
* The query context is passed as the first argument to any Convex query
|
|
102
|
+
* function run on the server.
|
|
103
|
+
*
|
|
104
|
+
* This differs from the {@link MutationCtx} because all of the services are
|
|
105
|
+
* read-only.
|
|
106
|
+
*/
|
|
107
|
+
export type QueryCtx = GenericQueryCtx<DataModel>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* A set of services for use within Convex mutation functions.
|
|
111
|
+
*
|
|
112
|
+
* The mutation context is passed as the first argument to any Convex mutation
|
|
113
|
+
* function run on the server.
|
|
114
|
+
*/
|
|
115
|
+
export type MutationCtx = GenericMutationCtx<DataModel>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A set of services for use within Convex action functions.
|
|
119
|
+
*
|
|
120
|
+
* The action context is passed as the first argument to any Convex action
|
|
121
|
+
* function run on the server.
|
|
122
|
+
*/
|
|
123
|
+
export type ActionCtx = GenericActionCtx<DataModel>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* An interface to read from the database within Convex query functions.
|
|
127
|
+
*
|
|
128
|
+
* The two entry points are {@link DatabaseReader.get}, which fetches a single
|
|
129
|
+
* document by its {@link Id}, or {@link DatabaseReader.query}, which starts
|
|
130
|
+
* building a query.
|
|
131
|
+
*/
|
|
132
|
+
export type DatabaseReader = GenericDatabaseReader<DataModel>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* An interface to read from and write to the database within Convex mutation
|
|
136
|
+
* functions.
|
|
137
|
+
*
|
|
138
|
+
* Convex guarantees that all writes within a single mutation are
|
|
139
|
+
* executed atomically, so you never have to worry about partial writes leaving
|
|
140
|
+
* your data in an inconsistent state. See [the Convex Guide](https://docs.convex.dev/understanding/convex-fundamentals/functions#atomicity-and-optimistic-concurrency-control)
|
|
141
|
+
* for the guarantees Convex provides your functions.
|
|
142
|
+
*/
|
|
143
|
+
export type DatabaseWriter = GenericDatabaseWriter<DataModel>;
|