mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(mitm): align hookBufferUpdate caller type with sourceModel runtime (R4 #4)
The local type annotation for `recordRequestStart` in `loadAgentBridgeHook` omitted `sourceModel`, but the call site at line 217-222 passes `sourceModel: this.extractSourceModel(body)` — which works at runtime (JavaScript ignores extra properties) but a future strict-mode caller relying on the narrower local type would silently drop the field. Add `sourceModel?: string | null` to the local recordRequestStart type to match the actual `agentBridgeHook.recordRequestStart` shape.
This commit is contained in:
@@ -53,6 +53,7 @@ async function loadAgentBridgeHook(): Promise<{
|
||||
body: Buffer;
|
||||
agentId: AgentId;
|
||||
mappedModel: string;
|
||||
sourceModel?: string | null;
|
||||
}) => Promise<InterceptedRequest>;
|
||||
recordRequestComplete?: (
|
||||
intercepted: InterceptedRequest,
|
||||
|
||||
Reference in New Issue
Block a user