Executor-Tyrant-Framework commited on
Commit
a338d3d
·
verified ·
1 Parent(s): eef10f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -164,9 +164,14 @@ def execute_tool(tool_name: str, args: dict) -> dict:
164
  formatted = "\n\n".join([f"📜 **{r['file']}**\n{r['snippet']}" for r in res]) if res else "No matches found."
165
  return {"status": "executed", "tool": tool_name, "result": formatted}
166
  elif tool_name == 'write_file':
167
- return {"status": "staged", "tool": tool_name, "args": args, "description": f"✏️ Write to `{args.get('path')}`"}
 
 
168
  elif tool_name == 'shell_execute':
169
- return {"status": "staged", "tool": tool_name, "args": args, "description": f"🖥️ Execute: `{args.get('command')}`"}
 
 
 
170
  elif tool_name == 'create_shadow_branch':
171
  return {"status": "staged", "tool": tool_name, "args": args, "description": "🛡️ Create shadow branch"}
172
  return {"status": "error", "result": f"Unknown tool: {tool_name}"}
 
164
  formatted = "\n\n".join([f"📜 **{r['file']}**\n{r['snippet']}" for r in res]) if res else "No matches found."
165
  return {"status": "executed", "tool": tool_name, "result": formatted}
166
  elif tool_name == 'write_file':
167
+ # BYPASS GATE: Execute immediately
168
+ result = ctx.write_file(args.get('path', ''), args.get('content', ''))
169
+ return {"status": "executed", "tool": tool_name, "result": result}
170
  elif tool_name == 'shell_execute':
171
+ # BYPASS GATE: Execute immediately
172
+ result = ctx.shell_execute(args.get('command', ''))
173
+ return {"status": "executed", "tool": tool_name, "result": result}
174
+
175
  elif tool_name == 'create_shadow_branch':
176
  return {"status": "staged", "tool": tool_name, "args": args, "description": "🛡️ Create shadow branch"}
177
  return {"status": "error", "result": f"Unknown tool: {tool_name}"}