const { SCPBody, PatternStore, AdaptiveMemory } = require("scp-protocol")
const { OllamaBridge } = require("scp-protocol/bridges/ollama")
class Patrol extends SCPBody {
static bodyName = "patrol"
static tools = {
halt: { description: "stop", parameters: {} },
advance: {
description: "move forward",
parameters: { speed: { type: "number", min: 0, max: 1, required: true } },
},
}
async halt() { /* drive hardware */ }
async advance({ speed }) { /* drive hardware */ }
}
const body = new Patrol({
patternStore: new PatternStore({ featureExtractor: (e) => ({ kind: e.kind }) }),
adaptiveMemory: new AdaptiveMemory({ threshold: 0.8 }),
brain: new OllamaBridge({ model: "llama3.2" }),
})