199
const required = new Set(schema.required ?? []);
200
return (value, path) => {
201
>
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
agentHostSchema.ts
202
throw invalidParams(path, 'object', value);
203
}
205
>
for (const key of Object.keys(propAsserts)) {
206
>
const childPath = joinPath(path, key);
207
>
if (obj[key] === undefined) {
208
if (required.has(key)) {
209
throw new ProtocolError(JsonRpcErrorCodes.InvalidParams, `Missing required property at '${childPath}'`);