Description
When schemas registered in the ACP Web GUI contain union types (e.g., "type": ["string", "number"] for optional fields like limitPrice, size, takeProfit, stopLoss), the SDK emits strict mode warnings to stderr on every schema compilation:
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/limitPrice" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/size" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/takeProfit" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/stopLoss" (strictTypes)
strict mode: use allowUnionTypes to allow union type keyword at "#/properties/closeSize" (strictTypes)
Root Cause
In dist/index.mjs:4118, AJV is initialized without allowUnionTypes:
this.ajv = new Ajv({ allErrors: true });
Suggested Fix
this.ajv = new Ajv({ allErrors: true, allowUnionTypes: true });
Impact
- Functional impact: None — validation still works correctly
- Operational impact: These warnings go to stderr, which Railway (and other platforms) classify as error-level logs. This triggers false positive monitoring alerts for any agent using schemas with union types. We had to add noise filters in our monitoring to suppress them.
Environment
@virtuals-protocol/acp-node v0.3.0-beta.38 and beta.39
- Node.js 22.16.0
Description
When schemas registered in the ACP Web GUI contain union types (e.g.,
"type": ["string", "number"]for optional fields likelimitPrice,size,takeProfit,stopLoss), the SDK emits strict mode warnings to stderr on every schema compilation:Root Cause
In
dist/index.mjs:4118, AJV is initialized withoutallowUnionTypes:Suggested Fix
Impact
Environment
@virtuals-protocol/acp-nodev0.3.0-beta.38 and beta.39