mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
feat(motion): add GEM-X backend and duplex streaming API
Add the GEM-X native backend with live pose and root displacement output, bounded duplex WebSocket streaming, session authorization, metrics and usage accounting. Share the embedded bidirectional RPC channel adapter across streaming backends.
Include backend build and gallery integration, API documentation, schemas and tests.
Assisted-by: Codex:gpt-6
Signed-off-by: Richard Palethorpe <io@richiejp.com>
(cherry picked from commit 016dc3d71a)
This commit is contained in:
1 parent
29eba5b7f8
commit
3de91d48d9
87 files changed
+5160
-523
No files matched your search
@@ -345,6 +345,12 @@ export function protoChangeIsAdditive(previousText, currentText) {
|
||||
// first-match-wins per changed file, so specific entries must precede the
|
||||
// scripts/build/ catch-all at the bottom.
|
||||
export const SHARED_BUILD_INPUTS = [
|
||||
{
|
||||
// GEM-X links the public motion protocol and shared frame validation.
|
||||
matches: file => file.startsWith("pkg/motion/") && !file.endsWith("_test.go"),
|
||||
linux: item => item.backend === "gemxcpp",
|
||||
darwin: item => item.backend === "gemxcpp",
|
||||
},
|
||||
{
|
||||
// Every language consumes backend.proto: Dockerfile.python COPYs it, Go
|
||||
// backends regenerate their stubs from it via `make protogen-go`, the C++
|
||||
|
||||
@@ -10,6 +10,7 @@ import assert from "node:assert/strict";
|
||||
|
||||
import {
|
||||
filterMatrix,
|
||||
SHARED_BUILD_INPUTS,
|
||||
inferBackendPath,
|
||||
inferBackendPathDarwin,
|
||||
} from "./backend-filter.mjs";
|
||||
@@ -19,6 +20,11 @@ test("kimodocpp maps to its native Go wrapper on Linux and Darwin", () => {
|
||||
assert.equal(inferBackendPathDarwin({ backend: "kimodocpp", lang: "go" }), "backend/go/kimodocpp/");
|
||||
});
|
||||
|
||||
test("gemxcpp maps to its native Go wrapper on Linux and Darwin", () => {
|
||||
assert.equal(inferBackendPath({ backend: "gemxcpp", dockerfile: "./backend/Dockerfile.golang" }), "backend/go/gemxcpp/");
|
||||
assert.equal(inferBackendPathDarwin({ backend: "gemxcpp", lang: "go" }), "backend/go/gemxcpp/");
|
||||
});
|
||||
|
||||
test("trellis2cpp maps to its Go backend source directory", () => {
|
||||
assert.equal(
|
||||
inferBackendPath({
|
||||
@@ -596,3 +602,13 @@ test("unresolvable proto revisions conservatively rebuild everything", () => {
|
||||
assert.equal(filtered.length, includes.length);
|
||||
assert.equal(filteredDarwin.length, includesDarwin.length);
|
||||
});
|
||||
|
||||
|
||||
test("public motion schema and validation changes rebuild GEM-X on both OSes", () => {
|
||||
for (const file of ["pkg/motion/proto/motion.proto", "pkg/motion/validation.go"]) {
|
||||
const rules = SHARED_BUILD_INPUTS.filter(rule => rule.matches(file));
|
||||
assert.ok(rules.some(rule => rule.linux({ backend: "gemxcpp", dockerfile: "./backend/Dockerfile.golang" })));
|
||||
assert.ok(rules.some(rule => rule.darwin({ backend: "gemxcpp", lang: "go" })));
|
||||
assert.ok(!rules.some(rule => rule.linux({ backend: "kimodocpp", dockerfile: "./backend/Dockerfile.golang" })));
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user