Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
add xspace-agent/agent-voice-chat/src/server/middleware/validate.js
overstepping1033fb492c6c
diff --git a/xspace-agent/agent-voice-chat/src/server/middleware/validate.js b/xspace-agent/agent-voice-chat/src/server/middleware/validate.jsnew file mode 100644index 000000000..ed59aae7f--- /dev/null+++ b/xspace-agent/agent-voice-chat/src/server/middleware/validate.js@@ -0,0 +1,27 @@+// SPDX-License-Identifier: Apache-2.0+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent)++const { ZodError } = require("zod")++function validate(schema) {+ return (req, res, next) => {+ try {+ req.body = schema.parse(req.body)+ next()+ } catch (err) {+ if (err instanceof ZodError) {+ return res.fail(+ "VALIDATION_ERROR",+ "Request body validation failed",+ 400,+ err.issues.map(e => ({ path: e.path.join("."), message: e.message }))+ )+ }+ next(err)+ }+ }+}++module.exports = { validate }++