Details
Alternatively, if PraisonAI wants to delegate approval to AI SDK v6, translate onToolCall into per-tool needsApproval semantics so AI SDK pauses before calling execute.
Regression tests should include:
onToolCallreturns false and the toolexecute()counter remains zero;onToolCallreturns true and the tool executes exactly once;tool_rejectedis never reported together with a tool result produced by the denied tool;- streaming and non-streaming loop variants use the same approval ordering if added later.
Affected Package/Versions
- Repository:
MervinPraison/PraisonAI - Package:
npm:praisonai - Component: TypeScript
AgentLoop - Current head validated:
1ad58ca02975ff1398efeda694ea2ab78f20cf3e - Current tag validated:
v4.6.58 - Latest npm package validated:
1.7.1
Suggested affected range:
npm:praisonai >= 1.4.0, <= 1.7.1
Selected version sweep:
1.0.0: package main cannot be required in the selected test environment.1.2.0:createAgentLoopis not exported.1.3.6:createAgentLoopis not exported.1.4.0: vulnerable.1.5.0: vulnerable.1.5.4: vulnerable.1.6.0: vulnerable.1.7.0: vulnerable.1.7.1: vulnerable.
Advisory History
This is distinct from known and previously submitted PraisonAI issues:
GHSA-ffp3-3562-8cv3covers Pythonpraisonaiagentsapproval cache keyed by tool name rather than invocation arguments.GHSA-qwgj-rrpj-75xmcovers Python Chainlit UI overriding configured approval mode withauto.GHSA-63v4-w882-g4x2/ poc covers PythonHTTPApprovalapproval-page XSS.- poc covers npm TypeScript
AgentOSmissing authentication. - poc covers npm TypeScript
codeModesandbox escape. - poc covers npm TypeScript
MCPServermissing authentication.
No visible local or GitHub advisory covers npm TypeScript AgentLoop.onToolCall executing after tool results already exist.