this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

more

+21 -3
+16 -3
claudeio/lib/client.ml
··· 12 12 let open Ezjsonm in 13 13 let data = Control.data control_msg in 14 14 Log.info (fun m -> m "Handling control request: %s" (Control.subtype control_msg)); 15 + Log.info (fun m -> m "Control request data: %s" (value_to_string data)); 15 16 match Json_utils.find_string data ["request"; "subtype"] with 16 17 | "can_use_tool" -> 17 18 let tool_name = Json_utils.find_string data ["request"; "tool_name"] in 18 19 let input = find data ["request"; "input"] in 20 + Log.info (fun m -> m "Permission request for tool '%s' with input: %s" 21 + tool_name (value_to_string input)); 19 22 let suggestions = 20 23 try 21 24 let sugg_json = find data ["request"; "permission_suggestions"] in ··· 28 31 in 29 32 let context = Permissions.Context.create ~suggestions () in 30 33 34 + Log.info (fun m -> m "Invoking permission callback for tool: %s" tool_name); 31 35 let result = match t.permission_callback with 32 - | Some callback -> callback ~tool_name ~input ~context 33 - | None -> Permissions.default_allow_callback ~tool_name ~input ~context 36 + | Some callback -> 37 + Log.info (fun m -> m "Using custom permission callback"); 38 + callback ~tool_name ~input ~context 39 + | None -> 40 + Log.info (fun m -> m "Using default allow callback"); 41 + Permissions.default_allow_callback ~tool_name ~input ~context 34 42 in 43 + Log.info (fun m -> m "Permission callback returned: %s" 44 + (match result with 45 + | Permissions.Result.Allow _ -> "ALLOW" 46 + | Permissions.Result.Deny _ -> "DENY")); 35 47 36 48 let response = dict [ 37 49 "type", string "control_response"; ··· 73 85 ~request_id:(Json_utils.find_string json ["request_id"]) 74 86 ~subtype:(Json_utils.find_string json ["request"; "subtype"]) 75 87 ~data:json in 76 - Log.debug (fun m -> m "Received control request: %s" (Control.subtype control_msg)); 88 + Log.info (fun m -> m "🎯 Received control request: %s (request_id: %s)" 89 + (Control.subtype control_msg) (Control.request_id control_msg)); 77 90 handle_control_request t control_msg; 78 91 loop () 79 92
+5
claudeio/lib/transport.ml
··· 84 84 let custom_env = List.map (fun (k, v) -> Printf.sprintf "%s=%s" k v) (Options.env options) in 85 85 let env = Array.of_list (base_env @ custom_env) in 86 86 Log.debug (fun m -> m "Environment: HOME=%s, PATH=%s" home path); 87 + Log.info (fun m -> m "Full environment variables: %s" (String.concat ", " (Array.to_list env))); 87 88 88 89 let stdin_r, stdin_w = Eio.Process.pipe ~sw process_mgr in 89 90 let stdout_r, stdout_w = Eio.Process.pipe ~sw process_mgr in ··· 95 96 let process = 96 97 try 97 98 Log.info (fun m -> m "Spawning claude with command: %s" (String.concat " " cmd)); 99 + Log.info (fun m -> m "Command arguments breakdown:"); 100 + List.iteri (fun i arg -> 101 + Log.info (fun m -> m " [%d]: %s" i arg) 102 + ) cmd; 98 103 Eio.Process.spawn ~sw process_mgr 99 104 ~env 100 105 ~stdin:(stdin_r :> Eio.Flow.source_ty r)